Chip,

Chip Whitmer-2 wrote:
> If I understand you correctly, my original document may be incorrect,
> because it doesn't include the <x:xmpmeta> elements that iText expects.  I
> receive these documents from an external source, so I don't control their
> construction.

More exactly, I don't know whether your the metadata stream of your document
or iText is incorrect (you could check by comparing with the appropriate
documentation available on the Adobe web site).

I think, though, that the approach of iText looks quite harsh: First it
parses the existing metadata and manipulates them, not caring about the very
structure, but when it writes the data back it suddenly makes assumptions
concerning the structure. Maybe those assumptions are well-founded by the
specs, but as they can result in information loss as in your case, they
aren't good style.

Chip Whitmer-2 wrote:
> Can someone recommend a workaround of some kind?  Can I use PdfStamper to
> clean up the original file?  What would make the file "correct"?

Update iText --- as mentioned, I don't see your error output when running
your code with iText trunk.

Regards,   Michael.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/PdfStamper-error-Premature-end-of-file-tp2304334p2306048.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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