I'm looking for some help. My goal is to get a customer PDF to popup within APEX to allow printing of a record but within a template that is designed to populate fields within a form that'll be printed and mailed to other organizations.
I found this white paper and have used it exclusively for trying to resolve this scenario:
http://www.oracle.com/technetwork/developer-tools/apex/learnmore/custom-pdf-reports-1953918.pdf
- The white paper talks about different methods for configuring PDF Printing in APEX (Apache FOP, BI Publisher, and APEX listener). I opted to use and configure the APEX listener as the print server, page 7-8, to avoid any licensing fees with the other products.
- On page 9 it shows steps for testing it by printing a simple classic report as a PDF. I followed these steps and it worked fine, I'm alble to generate a PDF in APEX using a generic classic report. So far so good.
- Page 10 it starts to discuss creating a custom PDF using a XSL-FO layout and mentions a couple products that can be used, Altova Stylevision or Stylus Studio. Again I'm trying to avoid licensing fees so I used the download from Oracle for the BI Publisher plugin to Microsoft Word.
Steps for creating the template.
- I created a classic report in APEX with my data fields.
- I changed the print options to XML and saved the results into a .xml file.
- I created the template in Word and under the BI Publisher tab clicked Sample XML. Imported my file, clicked fields and was able to insert them into my word document.
- I then clicked preview PDF from my word document and it displays the PFD, brings in the XML data and inserts it into the places I need in my custom form. So far still looking good.
- I then click export and select XSL-FO Stylesheet. This spits out into a browser the stylesheet xml which I copy into wordpad and name the file <name>.xslt-fo.
- Using the white paper instructions on page 16. I import the .xsl-fo stylesheet into the Report Layouts and I configure my report that originally spit out my XML I used in BI Publisher to now do PDF output format and I select the report layout I imported.
- This is where it goes wrong. When I click print it comes up with an error saying "File does not begin with '%PDF-', Local\EWH-5472-0.
- I assume it is talking about the file I'm importing in, it's the only thing that I have control the file name of, I've tried calling it PDF-Test.xslt-fo, PDF-Test.xsl-fo, and even PDF-TEST.pfd. It always gets the same error, whether I have PDF in the name or not.
I assume it has something to do with the stylesheet and how I'm naming it?
Any help would be appreciated, I assume someone has tried to do something similar to what I've done.
Thanks,
Thomas Bockert
Meredith Corporation