This is because the ';'is a predefined special character for XMP metadata as defined in ISO 16682-1. There are no issues with iText.
Leonard From: <Crosby>, Jonathan <jonathan.cro...@swissglobal-am.com<mailto:jonathan.cro...@swissglobal-am.com>> Reply-To: Post here <itext-questions@lists.sourceforge.net<mailto:itext-questions@lists.sourceforge.net>> Date: Tuesday, February 18, 2014 10:53 AM To: Post here <itext-questions@lists.sourceforge.net<mailto:itext-questions@lists.sourceforge.net>> Subject: [iText-questions] Problem with iTextSharp Hi there We have discovered an error with your code. When setting MoreInfo using the Stamper, there are some strange behaviours in combination with using some special characters. When the text being set contains a semicolon or a double quote, the keywords text is duplicated. Here is a vb.net example: Dim pdf_Reader AsNewPdfReader(str_FilePathOriginal) Dim pdf_Stamper AsNewPdfStamper(pdf_Reader, NewFileStream(str_FilePathNew, FileMode.Create)) Dim pdf_Dictionary AsNewDictionary(OfString, String) pdf_Dictionary = pdf_Reader.Info pdf_Dictionary.Remove(str_MetaFieldWrite) pdf_Dictionary.Add(str_MetaFieldWrite, "Andy;") pdf_Stamper.MoreInfo = pdf_Dictionary pdf_Stamper.Close() Result in the Metadata: [cid:image001.png@01CF2CC9.F03E3110] replacing the content of the field to pdf_Dictionary.Add(str_MetaFieldWrite, "Andy") result in the correct behaviour: [cid:image002.png@01CF2CC9.F03E3110] There may be further special characters causing this error. Please can you resolve this problem or at least inform us, if this is the expected behaviour of your tool and how we can avoid these duplicate values. Many thanks for this great tool & kind regards Jonathan Crosby _________________________________________ Jonathan Crosby Business Technology Swiss & Global Asset Management Ltd. Hardstrasse 201, P.O. Box, CH-8037 Zurich T +41 58 426 61 32 www.swissglobal-am.com<http://www.swissglobal-am.com/> Swiss & Global cares about the environment: Please do not print this e-mail unless you really need to. This email is confidential. If you are not the intended recipient, please advise us immediately and delete this message. See https://www.swissglobal-am.com/Disclaimer_Email for further information on confidentiality, the risks of non-secure electronic communication, and certain disclosures which we are required to make in accordance with applicable legislation and regulations. If you cannot access this link, please notify us by reply message and we will send the contents to you.
<<attachment: image001.png>>
<<attachment: image002.png>>
------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php