Hi ! I have a problem with the class XMPWriter. With this code, always the memory stream object has length=0.
What can I do to fix it? Thank you very much, iTextSharp.text.pdf.PdfReader readInputPDF = null; MemoryStream ms=null; iTextSharp.text.xml.xmp.XmpWriter xmp=null; try { ms = new MemoryStream(); xmp = new iTextSharp.text.xml.xmp.XmpWriter(ms, "UTF-8", 1); xmp.AddRdfDescription("http://ns.adobe.com/pdfx/1.3/", string.Format("<pdfx:{0}>{1}</pdfx:{0}>",txtKey.Text,txtValue.Text)); readInputPDF = new iTextSharp.text.pdf.PdfReader(sourceFile); using (System.IO.FileStream fs = new System.IO.FileStream(resultFile, FileMode.Create)) { using (iTextSharp.text.pdf.PdfStamper stamper = new iTextSharp.text.pdf.PdfStamper(readInputPDF, fs)) { stamper.XmpMetadata = ms.ToArray(); } } } catch (Exception ex) { this.txtMetadata.Text = ex.ToString(); } finally { xmp.Close(); ms.Close(); readInputPDF.Close(); } -- View this message in context: http://itext-general.2136553.n4.nabble.com/System-IO-MemoryStream-empty-using-XMPWriter-tp4658868.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&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