Can you please post a target.pdf? -----Original Message----- From: Patrick Hartmann [mailto:patrick.hartm...@abacus.ch] Sent: Tuesday, November 17, 2009 1:33 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] PdfStamper modifies XmpMetadata
Hi I use iText 2.1.7 to create and modify PDF files. Attached one of my self created PDF files. In every PDF, I write my own XmpMetadata, including a hash code, to be sure, that nobody else has modified the meta data. Let's say, I want to extend the PDF file with a keyword, so I use the PdfStamper. But there is a problem. The PdfStamper changes some data inside my meta data. Why does he do that? I only want to add a keyword to the PDF, but the PdfStamper changes also my meta data. I wrote an example, also attached to this mail. Now, what does the PdfStamper change. When you open the source.pdf and target.pdf (after it has been created), compare the text inside the "ocr"-element, that is a few levels under the "abascan"-element. In the source.pdf, every line ends with CR, LF. But in target.pdf, every line ends only with a LF. (see attached screenshot.png) And that of course changes my hash code. Do you have a solution/workaround for this problem? Thanks and best regards Patrick Hartmann ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/