hi,
---------------------------------------- > Date: Mon, 28 Feb 2011 11:39:53 -0800 > From: shadesofkni...@yahoo.com > To: iText-questions@lists.sourceforge.net > Subject: [iText-questions] PDF Stamper creates damaged file? > Here's what I have: > > Protected Sub GeneratePDFWithText(ByVal sender As Object, ByVal e As > EventArgs) > > Dim fileName As String = "pdfDocument" & DateTime.Now.Ticks & ".pdf" > Dim sourcepdf As String = System.AppDomain.CurrentDomain.BaseDirectory() & > "SourcePDFs\CRM1008-01-MoreRefLtr.pdf" > Dim reader As PdfReader = New PdfReader(sourcepdf) > Dim stamp As PdfStamper = New PdfStamper(reader, Response.OutputStream) > > > Response.Clear() remove Response.Clear(). the call is removing the PDF header from the generated file, since you're using Response.OutputStream. ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText® 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