Re: [iText-questions] PDFStamper weird situation.

2013-06-05 Thread _
t Software [mailto:i...@1t3xt.info] Sent: Wednesday, June 05, 2013 4:56 PM To: 'Post all your questions about iText here'; _ Subject: Re: [iText-questions] PDFStamper weird situation. On Wed, 05 Jun 2013 15:58:49 +0200, _ wrote: > I need to keep the memory stream open so that I save i

Re: [iText-questions] PDFStamper weird situation.

2013-06-05 Thread iText Software
On Wed, 05 Jun 2013 15:58:49 +0200, _ wrote: > I need to keep the memory stream open so that I save it to a file later > (I > save it at the same path as the source file, meaning that I overwrite > it). > I could specify another file for saving, but it changes my whole code. > I want to save

Re: [iText-questions] PDFStamper weird situation.

2013-06-05 Thread _
. -Original Message- From: iText Software [mailto:i...@1t3xt.info] Sent: Wednesday, June 05, 2013 4:38 PM To: 'Post all your questions about iText here'; _ Subject: Re: [iText-questions] PDFStamper weird situation. On Wed, 05 Jun 2013 15:39:40 +0200, _ wrote: > But now it

Re: [iText-questions] PDFStamper weird situation.

2013-06-05 Thread iText Software
On Wed, 05 Jun 2013 15:39:40 +0200, _ wrote: > But now it doesn't save the PDF correctly... If only you told us WHY you want to keep the stream open. You're not supposed to do that, because adding stuff after the %%EOF marker of a valid PDF usually breaks the PDF (unless you're creating an i

Re: [iText-questions] PDFStamper weird situation.

2013-06-05 Thread _
But now it doesn't save the PDF correctly... Oh my... -Original Message- From: Paulo Soares [mailto:pgpsoa...@gmail.com] Sent: Wednesday, June 05, 2013 12:14 AM To: Post all your questions about iText here Subject: Re: [iText-questions] PDFStamper weird situation.

Re: [iText-questions] PDFStamper weird situation.

2013-06-04 Thread _
: [iText-questions] PDFStamper weird situation. Call PdfStamper.Writer.CloseStream=false to keep the stream open after PdfStamper.Close(). Paulo On Tue, Jun 4, 2013 at 9:10 PM, wrote: > I've commented out pdfStamper.Close() because when executed it seemed > to close the memory stream, so

Re: [iText-questions] PDFStamper weird situation.

2013-06-04 Thread Paulo Soares
Call PdfStamper.Writer.CloseStream=false to keep the stream open after PdfStamper.Close(). Paulo On Tue, Jun 4, 2013 at 9:10 PM, wrote: > I've commented out pdfStamper.Close() because when executed it seemed to > close the memory stream, so I couldn't save it to a file anymore (!). > The PdfRea

Re: [iText-questions] PDFStamper weird situation.

2013-06-04 Thread kgk
I've commented out pdfStamper.Close() because when executed it seemed to close the memory stream, so I couldn't save it to a file anymore (!). The PdfReader.Close() is a little bit silly thing to do, yes (I realize it now). But why there isn't a PdfStamper.Flush() if there are problems like that?

Re: [iText-questions] PDFStamper weird situation.

2013-06-04 Thread iText Mailing List
On Tue, 04 Jun 2013 17:31:45 +0200, _ wrote:Any ideas on why the output file is small and corrupt?Why is pdfStamper.Close() commented out, and why is the stamper closed before the reader?Without pdfStamper.Close() several objects won't be written to the output.Closing the reader before closing th

[iText-questions] PDFStamper weird situation.

2013-06-04 Thread _
I have a piece of code that is attempting to add a text to a text field with PdfStamper. I need to save the new file over the old one so I use a MemoryStream. Everything works fine but the PDF is corrupt or the text is missing. When I use the following code the PDF is corrupt. It was also very sma