Marc, [properly closing the stamper]
Moore, Marc wrote > I had explicit closes of the stamper and the memory stream when I first > noticed the problem. After looking at some other folks' code I introduced > the usings, but there was no change in behavior. I'd be happy to change it > back if it would solve the problem, but I don't think it will. If iTextSharp behaves here as iText (for Java) does, closing is essential. Thus, I would suggest again closing the stamper before returning its output. As you say, though, that you had closed the stamper before and also seen those issues, you maybe should take a different approach and first try what happens if you save the MemoryStream contents to harddisc and then try to open that file directly. If you observe the same issue, please post that file here. If you don't, then the problem is not due to iText but to some other reason. I hardly know the .NET API and thus cannot say whether what you do is correct. I have heard, though, that some people return MemoryStream.GetBuffer to the client as response; this would be incorrect as the buffer may contain additional, uninitialized data. Regards, Michael -- View this message in context: http://itext-general.2136553.n4.nabble.com/Using-iTextSharp-to-write-data-to-PDF-works-great-but-Acrobat-Reader-asks-Do-you-want-to-save-changee-tp4656443p4656478.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ 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
