I am developing some custom reports that I need as PDFs. My client does not have BI Publisher so I am doing some custom xsl to generate the reports. I test as I develop by using a simple web page that POSTs to the apex_fop.jsp. Then I also test by saving the XML and XSL to the database and then query them and using apex_util.download_print_document, passing the XML and XSL as a blob and clob respectively.
The issue I have is an ampersand. The following line
<td>this & that</td>
works great when sent via the web page post to apex_fop.jsp. However when the exact same file is saved to the database and run through apex_util.download_print_document and opened with Adobe Reader, it says the file has been damaged and the oc4j error log for the fop application says
oracle.xml.parser.v2.XMLParseException: Unexpected EOF
What's the difference between the two calling methods, and how do I get ampersands in the data using apex_util.download_print_document.
Thanks.