Thanks a lot, this seems to have worked, When I added the content length it opened up in the browser. We didnot put it since we directly write to the servletoutputstream.
We have some huge PDFs which we generate on the fly like 1100 pages long. Since we directly write to the servlet output stream we never ran into any problems. With this approach of caching into the bytearrayoutputstream and then writing to the servletoutputstream, will we not run into memory issues? The link mentions how to avoid timeout problem. Which we can implement. But is there a way to get away with not write to the bytearrayoutputstream?
Also when we upgrade to 7.0 the issue goes away. According to the link its a browser specific problem, i.e, without content-length it behaves oddly. But why did it go away when we upgraded to 7.0 version? How does the browser and the acrobat version tied together in this case?
Thanks a lot for the solution.
Rumpa Giri
Paulo Soares <[EMAIL PROTECTED]> wrote:
Paulo Soares <[EMAIL PROTECTED]> wrote:
That's a server problem. See
http://itextdocs.lowagie.com/tutorial/general/webapp/.
I've also had good results with:
response.setContentType("application/pdf");
response.setContentLength(baos.size());
response.setHeader("Content-disposition", " inline;
filename=report.pdf");
ServletOutputStream sos = response.getOutputStream();
baos.writeTo(sos);
sos.flush();
Paulo
> -----Original Message-----
> From: Rumpa Giri [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 02, 2006 11:27 PM
> To: Paulo Soares; [email protected]
> Subject: RE: [iText-questions] PDFs not showing up in Acrobat
> 5.0 but opens up in Acrobat 7.0
>
> I uninstalled A crobat 7.0 on my machine and installed the
> 5.0.5 version to replicate the issue.
>
> Currently our application opens up a browser window to show
> the PDF when a user clicks on the link.
>
> On the link if you do right click and do a [Save Target As]
> and save the file and open it opens up in the 5.0.5, but if
> you click the link to open it in a browser window it show a
> blank page, momentarily the Adobe box shows up as if trying
> to open the PDF document, but the page is blank no PDF just
> an empty IE browser.
>
> Thanks,
> Rumpa
>
> Paulo Soares <[EMAIL PROTECTED]>wrote:
>
> If you save the pdf to a file instead of web serving
> it, does it open in
> Acrobat 5?
>
> > -----Original Message-----
> > From: Rumpa Giri [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 02, 2006 5:39 PM
> > To: Paulo Soares; [email protected]
> > Subject: Re: [iText-questions] PDFs not showing up in Acrobat
> > 5.0 but opens up in Acrobat 7.0
> >
> > No error, just blank page and it would say "Done" status bar
> > down below. And there is no exception at the server
> side either.
> >
> > We have plenty of users using 5.0, if we can find the
> > solution it will help us.
> >
> > Thanks,
> > Rumpa Giri
> >
> > Paulo Soares wrote:
> >
> > What's the Acrobat error?
> >
> > ----- Original Message -----
> > From: "Rumpa Giri"
> > To:
> > Sent: Wednesday, March 01, 2006 10:49 PM
> > Subject: [iText-questions] PDFs not showing up in
> > Acrobat 5.0 but opens up
> > in Acrobat 7.0
> >
> >
> > We are currently facing a problem of not able to open
> > the PDF in Acrobat 5.0
> >
> > But once Acrobat 7.0 is installed, we could open the
> > PDFs just fine. Is
> > there anyway to get around or do we have to notify
> > users to remove Acrobat
> > 5.0 and upgrade to Acrobat 7.0
> >
> > We used itext-1.3.jar. The layout of the PDF is
> > tabular. The code
> > extensively used PdfpCells and Pdfptable class. We have
> > a header and footer
> > on each page.
> >
> > Can we do anything in the code to make it open in 5.0?
> >
> > Any help will be much appreciated.
> >
> > Thanks,
> > Rumpa
> >
> >
> > ---------------------------------
> > Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a
> > groundbreaking scripting language
> > that extends applications into web and mobile media.
> > Attend the live webcast
> > and join the prime developer group breaking into this
> > new coding territory!
> >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&
> > dat=121642
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a
> groundbreaking scripting language
> that extends applications into web and mobile media.
> Attend the live webcast
> and join the prime developer group breaking into this
> new coding territory!
>
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
