Creating a PDF image in iText -


i'm trying add image have on filesystem pdf pdf i'm creating on fly.

i tried use image class, seems not work pdfs (only jpeg, png or gif). how can create element existing pdf, can place in new pdf?

please download chapter 6 of book , read class pdfimportedpage.

in basic example, you'd create pdfreader instance , import page pdfwriter instance, point on can use pdfimportedpage instance, either directly, or wrapped inside image object:

pdfreader reader = new pdfreader(existingpdf); pdfimportedpage page = writer.getimportedpage(reader, i); image img = image.getinstance(page); reader.close(); 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -