This discussion is archived
3 Replies Latest reply: Nov 15, 2012 7:37 AM by 520377 RSS

APEX FOP PDF printing setting problem

lxiscas Newbie
Currently Being Moderated
Hi, Guys:

I encounter problem to config APEX PDF printing with FOP, Apache. I follow the steps on this link:

http://www.apexninjas.com/blog/2011/02/setup-apex-pdf-report-printing-with-oc4j/

I first tried with my PC, I installed OC4J successfully and I downloaded APEX 4.1.1 to my own PC, and deploy FOP.war in OC4J successfully, and I set in APEX internal workspace/manage instance/instance settings/report printing, tested PDF printing OK. but when I tried on my server, it failed. The OC4J is installed on one server (10.22.8.254), and APEX is installed on another server (10.22.8.110). I did the same thing:

#1 install OC4J successfully,

#2 copy the file FOP.war to a sub directory on server of OC4J (10.22.8.254), and deploy it in OC4J without problem

#3 and I set up in APEX internal workspace on server/manage instance/instance settings /report printing as
print server: external (Apache FOP)
print server protocol: http
print server address: 10.22.8.254
print server port: 8888
print server script: /fop/apex_fop.jsp

the only change is:print server is changed from local host to 10.22.8.254

but I got this problem:

Adobe Reader could not open the 'report 1.pdf' because it is either not a supported file type or the file has been damaged.

could anyone help me on this problem?

many thanks!

Sam
  • 1. Re: APEX FOP PDF printing setting problem
    Kofi Journeyer
    Currently Being Moderated
    Sam,
    are you saying you got this error for the exact same report with exact same data sources that run correctly on the previous server?
    What do you see in your relevant logs(e.g. /OC4J HOME/j2ee/home/application-deployments/fop/fop/application.log)?
    The log will probably point to a problem of sorts.
    In the past when I have setup everything the right way and had these problems, they tend to be to be related to versions of the XML parser and things along that track.
    Kofi
  • 2. Re: APEX FOP PDF printing setting problem
    lxiscas Newbie
    Currently Being Moderated
    hi, kofi:

    Thanks for your suggestion. It looks mysterious. after I set up the IP of print server as localhost, it worked well. I asked my supervisor. he said localhost means the server. So it looks the APEX is using OC4J on the server, not OC4J on 10.22.8.254.

    another question is the printing port is 8888, which is exactly same as Oracle APEX is using on the server. Which makes me more confused. would n not there be a conflict on prot of APEx listener and printing?

    anyway, I got to read more documents.

    Thank you very much for your help.

    Sam
  • 3. Re: APEX FOP PDF printing setting problem
    520377 Explorer
    Currently Being Moderated
    lxiscas wrote:
    hi, kofi:

    Thanks for your suggestion. It looks mysterious. after I set up the IP of print server as localhost, it worked well. I asked my supervisor. he said localhost means the server. So it looks the APEX is using OC4J on the server, not OC4J on 10.22.8.254.
    This makes it sound like the problem is with your OC4J on 10.22.8.254? Did you actually install the FOP software there?

    If the printing works on localhost, then you must have installed the FOP on the APEX server?
    another question is the printing port is 8888, which is exactly same as Oracle APEX is using on the server. Which makes me more confused. would n not there be a conflict on prot of APEx listener and printing?
    The APEX EPG uses port 8080 by default.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points