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…

Printing PDF reports in Oracle APEX

04/2010 // Category: APEX, Application Express, FOP, Oracle, XSL-FO

Available solutions

PDF printing in Oracle Application Express requires an externally defined print server. When the user clicks a print link in Application Express, then the APEX engine generates the corresponding report data in XML format and a report template in XSL-FO or RTF format.

Your report server can be Oracle BI Publisher, OC4J with Apache FOP or another standard XSL-FO processing engine. While BI Publisher provides higher level of functionality, associated licensing costs are high. Standard configuration may be implemented with Apache FOP or another standard XSL-FO processing engine. Beginning with Application Express 3.0.1, a supported configuration of Apache FOP in conjunction with Oracle Containers for J2EE (10.1.3.2) is included, which also requires a license. BI Publisher and Apache FOP / Oracle Containers for J2EE are supported by Oracle.

An alternative, cost free solution: APEX + Cocoon

In it’s APEX+PDF how-to Oracle states that besides BI Publisher and Apache FOP any other standard XSL-FO processing engine can be used.

continue reading…

pagetop