A blank white screen or Acrobat Error in the browser.

Article ID: A1006
Last Review: November 8, 2004
Revision: 1.0

PRODUCT IT APPLIES TO
  • DynamicPDF Generator for .NET
  • DynamicPDF Merger for .NET
  • DynamicPDF Generator for Java
  • DynamicPDF Merger for Java
  • Generator
  • ReportWriter
SYMPTOMS
  • A blank white screen in the browser (Intermittent*).
  • Adobe PDF error message indicating "Adobe reader could not open the file ‘XXX.fdf' because it is either not a supported file type or because the file has been corrupted (for example it has been sent as an email attachment and wasn't correctly decoded)"
  • Adobe PDF error message indicating "The created pdf is corrupted and cannot be opened".
  • Adobe PDF error message indicating "The file is damaged and could not be repaired".
CAUSE

Stray HTML text or data being output to the output stream before or after the PDF code

OR

Using HTTP Post to the page creating the PDF

RESOLUTION

.Net

  • Get rid of all the HTML tags from your aspx page after <%@ Page… %> tag's or try adding a Response.End() directly after the DrawToWeb() method.
  • Change the HTTP POST to the page creating the PDF to HTTP GET.

Java

  • Get rid of all the white spaces and try to have all your JSP code within one block or try adding a sOut.flush() directly after the drawToWebPage() method.
  • Change the HTTP POST to the page creating the PDF to HTTP GET.

COM

  • Get rid of all the stray HTML being output to the output stream or try adding a Response.End() directly after the DrawToASP() method.
REMARKS
* Different versions of Acrobat behave differently using the same code. Some versions of Acrobat would output the pdf correctly while some versions would produce a blank white screen