Quoting Leonard Rosenthol <[EMAIL PROTECTED]>:

> Provided that you replace the ENTIRE object (with all associated
> elements in the dictionary), then it should be fine to replace Form
> XObjects as well.

Why is this important?

Suppose that your original XObject uses a font Helvetica,
referred to in the XObject's content stream as /F0.
Then you replace this content stream and the new XObject
uses a font Times New Roman. If this font is referred to
as /F0, and you don't change the resources dictionary,
you won't see Times New Roman, but Helvetica (and it will
look ugly because the character advances in Helvetica are
different from those in Times New Roman).
More likely, the name used as a reference for the font will
be different (for instance /F1 instead of /F0); in that case
the PDF will be corrupt: if /F1 isn't present in the resources
Adobe Reader doesn't know which font you want to use.

Fonts are only one type of resources. You can run in to
similar problems with other resources too. This is explained
in chapter 18 of the book "iText in Action".
--
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to