Felipe Roos da Rosa wrote:
> Would it be possible?

In the page dictionary of a page with images, you have something like 
this: /XObject<</img2 5 0 R/img0 3 0 R/img3 6 0 R/img1 4 0 R>>
Objects 3, 4, 5, and 6 are stream objects, containing the bits and bytes 
of the image.

In chapter 16 of the second edition of "iText in Action", such an image 
stream is replaced by another image stream.

In theory, it would be possible to replace these objects by a Form 
XObject (PdfTemplate), but what makes it difficult, is that a Form 
XObject isn't just "one" object. A Form XObject also has a Resources 
dictionary referring to Font objects, other XObjects, etc...

That makes it very difficult to achieve what you need. Just replacing 
the image stream won't be sufficient, you'll also have to copy every 
resource needed by the imported page and make sure the references are 
correct. This will demand a lot of extra programming. You'll have to 
evaluate if it's worth changing something that already works well into 
something that works better.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to