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 As New PdfReader(str_FilePathOriginal)
Dim pdf_Stamper As New PdfStamper(pdf_Reader, New
FileStream(str_FilePathNew, FileMode.Create))
Dim pdf_Dictionary As New Dictionary(Of String, 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:[email protected]]
replacing the content of the field to
pdf_Dictionary.Add(str_MetaFieldWrite, "Andy")
result in the correct behaviour:
[cid:[email protected]]
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.
<<inline: image001.png>>
<<inline: 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 [email protected] 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
