Oracle APEX / FOP / Cocoon: Invalid characters in XML data

The setup is Oracle APEX with Tomcat / Cocoon as XSL-FO processor to generate PDF reports.

PDF reports in some cases do not open, instead in Acrobat (Reader) you are presented with an error message that Acrobat could not open the file because it is either damaged or not a supported file type.

Acrobat error message after creating new PDF report in APEX

If file size of the XML data sent from APEX to the print server is not an issue, another reason might be that you have an invalid character in your XML file.

Turn on debug in APEX to see the error message sent back from Cocoon.

continue reading…

Oracle APEX: XSL-FO with Tomcat/Cocoon

05/2010 // Category: APEX, FOP, Oracle, Tomcat/Cocoon, Ubuntu, XSL-FO

If BI Publisher is not a choice and you also prefer not to use the Apache FOP solution shipped with Oracle APEX (OC4J), you can use another XSL-FO Processing engine which is Apache Cocoon and Apache Tomcat.

Carl Backstrom describes the setup process on his blog:
http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html

For Ubuntu this post on the Ubuntu forums is helpful:
http://ubuntuforums.org/showthread.php?t=1004742

Printing large reports

Printing large reports requires some extra settings

Tomcat has by default a limit on POST size. That prevent you from downloading large PDF files.
On Ubuntu: open /etc/tomcat5.5/server.xml
sudo nano /etc/tomcat5.5/server.xml
Find line maxSpareThreads=”75″ and add after that add the following to a new line
maxPostSize="0"

Also you need to increase JAVA memory

continue reading…

pagetop