Serving PDF from a servlet - blank screen in IE

From: Alex Molochnikov (NOBODY_at_NOSPAM.COM)
Date: 04/28/04


Date: Wed, 28 Apr 2004 05:41:57 GMT

I have a problem that is driving me nuts. Our Web app generates PDF files
using iText library; the Tomcat servlet saves the PDF data into a temporary
file, and then forwards it to the browser using sendRedirect() method of
HttpServletResponse.

When the browser gets the response, it launches Adobe Acrobat plugin and
displays the file - at least, this is what it should do. However, sometimes
it shows a blank page, with the name of the PDF file in the Address field.
One must press the RELOAD button to get the file displayed.

This happens with the Internet Explorer - one some machines, but not on all
of them (IOW, in some cases the PDF files are displayed without delay). We
are using IE6.0.26 and Adobe Acrobat 6.0. OSes are: Win NT, 2K, XP. The
generated PDF files are small - under 100K.

This effect can only be observed on IE. Netscape Navigator works fine -
every time. Unfortunately, switching to Netscape is not a solution

Has anyone experienced something like this? I have not found anything on
Google that would resemble my problem.

Any clue will be highly appreciated.

Alex Molochnikov
Gestalt Corporation
www.gestalt.com


Quantcast