Make sure you don't have any newline in your JSP. There's no difference with
the streams in creating a new document or using PdfStamper.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Anil Edakkunni [SMTP:[EMAIL PROTECTED]
> Sent: Friday, May 30, 2003 16:33
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] Re: PdfStamper, JSP, IllegalStateException
> 
> thanks, Paulo...i feared as much..
> 
> but, i could create a new PDF document within the JSP without any problem.
> 
>     Document document = new Document (PageSize.A4);
>     PdfWriter writer = PdfWriter.getInstance (document, new
> DataOutputStream
> (response.getOutputStream()));
>     form.toPDF (document, ...);
> 
> i'm curious as to why that worked...
> 
> regards, anil.
> 
> "Paulo Soares" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Use a servlet. It can also work with JSP if you like strong emotions;
> make
> > sure that you don't write anything before getting the stream and make
> sure
> > that your server allows getting the stream after itself having provided
> a
> > writer.
> >
> > Best Regards,
> > Paulo Soares
> >
> > > -----Original Message-----
> > > From: Anil Edakkunni [SMTP:[EMAIL PROTECTED]
> > > Sent: Thursday, May 29, 2003 23:20
> > > To: [EMAIL PROTECTED]
> > > Subject: [iText-questions] PdfStamper, JSP, IllegalStateException
> > >
> > > Hi,
> > > I'm using a PdfStamper to fill AcroForm fields in a PDF document. This
> > > works
> > > fine outside of a JSP "context",
> > >
> > > but within a JSP, i get a:
> > >     Servlet Error: java.lang.IllegalStateException: Already called
> > > getOutputStream.
> > >
> > > at the call:
> > >         PdfStamper stamp = new PdfStamper(reader, out);
> > >
> > > where:
> > >      out = response.getOutputStream();
> > >
> > > is there a way out of this? or do i have to convert the JSP to a
> servlet?
> > >
> > > regards, anil.
> > >
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: eBay
> > > Get office equipment for less on eBay!
> > > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> > > _______________________________________________
> > > iText-questions mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: eBay
> > Get office equipment for less on eBay!
> > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: eBay
> Get office equipment for less on eBay!
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to