APEX 4.1 - APACHE FOP PDF generation problem.

Hi all,
I'm having problem with PDF generation using APACH FOP on OC4J.
When I test my print server as described here:
http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
everything works without problem. But when I upload my Layout to APEX and try to generate PDF from apex I'm getting error:
oracle.xml.parser.v2.XMLParseException: Unexpected EOF.
     at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)
     at oracle.xml.parser.v2.XMLReader.popXMLReader(XMLReader.java:549)
     at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1375)
     at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:362)
     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:308)
     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:337)
     at oracle.xml.xslt.XSLProcessor.newXSLStylesheet(XSLProcessor.java:714)
     at oracle.xml.xslt.XSLStylesheet.<init>(XSLStylesheet.java:322)
     at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:114)
     at apex_fop._jspService(_apex__fop.java:71)
     [SRC:/apex_fop.jsp:21]
I could see similar post here:
Handling Special characters in call to apex_util.download_print_document
But it doesn't explain my case as it's crashing even when I generate empty pdf(no data so no special characters, only empty XML file with no data should be sent to print server)
Is there any way to see what xml is sent do print server for processing? That could eventually show where is a problem.
Palo

My mistake, there was really an "&" character in my template. now when I replaced it with %26 it works.
However I would be still interested if there is a way to see what data is APEX engine sending to print server cause it will help me to find this kind of errors.
Palo

Similar Messages

  • Apache FOP PDF Save in BLOB column

    Hi,
    I just want to call Apache FOP in an APEX process to create PDF reports and save these reports in a BLOB column in the same database. So I can email these reports in another process using APEX_MAIL. Does anyone know a way to achieve this?
    Thanks

    If I understand correctly, your requirements needs to be broken down into two problems:
    1) click link that pops up a window displaying a new APEX page
    2) an APEX page the displays the document, not downloads it.
    I haven't done #1 (yet).
    However, you may be able to generate a URL that points to the new page as part of the SELECT statement for the Report.
    This has a related question, but no answer yet:
    open pdf in popup browser window
    The key is target="_blank" for the anchor tag.
    To generate the URL, you should use the APEX_UTIL.prepare_URL() function.
    If that doesn't work, a Dynamic Action that does some magical JavaScript stuff may be needed.
    For #2, I lost the URL that showed how to display a PDF as part of a "form" page.
    From what I remember:
    Start with a blank page with one blank HTML region (all the Items go in the HTML region)
    Add an Item for the PK/Doc_ID
    part I forgot Create a Data Manipulation Process
    - Automated Row Fetch
    - On Load - After Header
    - (stuff for your table/view)
    part I forgot Create an (I believe) "File Browser" item type. For Settings:
    - Storage Type "BLOB column specified in Item Source" (and place the column name of the BLOB there)
    - MIME Type Column: (column name) -- since you have multiple types, this is a MUST HAVE
    - Filename Column: (column name) -- I highly recommend you have this.
    - Content Disposition == INLINE <-- this is the kicker
    Also, you will need a Browser Plugin for each of the MIME Types (otherwise, the browser may try to 'download' the file)
    Browsers can handle Image types internally. Adobe's plugin can handle PDFs. I don't know about Word/Excel.
    Again, I don't remember the exact details, but that should cover most of it.
    MK

  • Help: PDF Generation Problems in Reports 3.0

    Hi Techies,
    We are generating PDFs from Oracle Reports 3.0
    The PDF generation is fine in some datbases.
    But in some database,when the records are more, during PDF
    generation, Dr.Watson error is encountered, saying access
    violation.
    Can any one please clarify whether the error is due to memory
    constraints on the system or if it has something to do with
    Oracle Reports setting, while generating PDFs.
    Do note that the reports are running fine, when the report has
    less number of records.
    Any suggestion/tip is awaited at the earliest.
    Thanks in advance,
    Geoff
    null

    Hi!
    Remove cache from output dir from time time.
    (i.e. from virtual dir where report server puts output)
    let me know ...
    later
    Geoff (guest) wrote:
    : Hi Techies,
    : We are generating PDFs from Oracle Reports 3.0
    : The PDF generation is fine in some datbases.
    : But in some database,when the records are more, during PDF
    : generation, Dr.Watson error is encountered, saying access
    : violation.
    : Can any one please clarify whether the error is due to memory
    : constraints on the system or if it has something to do with
    : Oracle Reports setting, while generating PDFs.
    : Do note that the reports are running fine, when the report has
    : less number of records.
    : Any suggestion/tip is awaited at the earliest.
    : Thanks in advance,
    : Geoff
    null

  • PDF Generation problems in Reports 3.0

    Hi,
    I am generating PDFs from Oracle Reports 3.0
    The PDF generation is fine in some datbases.
    But in some database,when the records are more, during PDF
    generation, Dr.Watson error is encountered, saying access
    violation.
    Can any one please clarify whether the error is due to memory
    constraints on the system or if it has something to do with
    Oracle Reports setting, while generating PDFs.
    Do note that the reports are running fine, when the report has
    less number of records.
    Any help in this matter is appreciated.
    Regards,
    PRAKASH
    null

    Hi!
    Remove cache from output dir from time time.
    (i.e. from virtual dir where report server puts output)
    let me know ...
    later
    Geoff (guest) wrote:
    : Hi Techies,
    : We are generating PDFs from Oracle Reports 3.0
    : The PDF generation is fine in some datbases.
    : But in some database,when the records are more, during PDF
    : generation, Dr.Watson error is encountered, saying access
    : violation.
    : Can any one please clarify whether the error is due to memory
    : constraints on the system or if it has something to do with
    : Oracle Reports setting, while generating PDFs.
    : Do note that the reports are running fine, when the report has
    : less number of records.
    : Any suggestion/tip is awaited at the earliest.
    : Thanks in advance,
    : Geoff
    null

  • Reports 6i Pdf generation problems

    Hi,
    I am using reports 6i with graphics. when I see the report inside the previewer the vertical tick marks on the X-axis appear fine, but when I generate to PDF the same tick marks appear inverted which can only be seen with the help of a mirror.
    I would appreciate any help.
    Paras

    Paras,
    Looks strange and interesting. Hope you have a mirror with you always now.
    Well. We have not come across this problem and not been able to reproduce also
    You can try generating to a eps file and convert it to PDF using Acrobat distiller and see how it comes out.
    You can log a TAR through Oracle metalink if you have a reproducible testcase
    Thanks
    The Oracle Reports team

  • Pdf generation problem

    Hello ,
    I have a web application that turn on Websphere 6.1. Since I haven't migrate my windows server from 2000 to 2003, no problem appeared when I try to generate and display my pdf trought my web browser.
    But since the migration , the pdf is not displyed in the web browser but i have a pop-up that explains me that the file could not be open by .. my pdf reader because the file seems to have a problem and it ask me if I want to download it , afterr the download the file can be open without any problem.
    Any suggestion about this issue ?
    Thanks a lot ...
    Please find the extract of the code :
    ReportExportControl exportControl = new ReportExportControl();
    exportControl.setName("ExportControl");
    exportControl.setExportAsAttachment(false);
    ExportOptions exportOptions = new ExportOptions(); //Set export options and   format.
    exportOptions.setExportFormatType(ReportExportFormat.PDF); //Set the format for the export options
    exportControl.setExportOptions( exportOptions ); //set the exportOptions to the viewer
        //Obtain report source of the report that the exportControl will display.   
        Object reportSource = request.getSession().getAttribute("reportSource");
        exportControl.setReportSource(reportSource);
        //exportControl.setParameterFields(fields);
         exportControl.setEnableParameterPrompt(false);
         exportControl.setEnableLogonPrompt(false);
         exportControl.setOwnPage(true);
         exportControl.setOwnForm(true);
         if (request.getSession().getAttribute("refreshedExport") == null) {
              exportControl.refresh();
              request.getSession().setAttribute("refreshedExport", "true");
        exportControl.processHttpRequest(request, response, getServletConfig().getServletContext(), null);

    You can find steps to resolve the issue on this document http://kb2.adobe.com/cps/328/328791.html.

  • RH PDF generation problems: wrong (A4) page size and Word 2013

    I am trying to generate a review PDF of a handful or topics. It generates, but first I get an error:
    (I have Word 2013 installed.)
    Then the PDF generates, but it is A4. I never use metric for anything, so where it is picking up A4 I can't imagine. I have all my PDF settings to letter. I checked Edit > Properties > PDF settings > Advanced settings, everything. It's all set correctly. Even all of my Word templates (which I am not using for this project anyway) are letter. Like I said: No metric pages or units of measure used ever. Not in Word, not in FrameMaker, not in Acrobat. Why does RoboHelp default to A4?
    And why does it not consider Word 2013 "newer" than Word 2000?

    Word 2013 is not supported by any version of Rh. The first part is correct so Rh throws the error message notwithstanding the second part is wrong.
    You haven't mentioned the version of Rh you are using (please see the forum sticky topics) but you might find you can right click Properties in the print layout and generate to Word there. Using that route you may find the answer to the A4 issue. I'm puzzled by that as normally Rh defaults to Letter.
    Are you using the PDF add-on or a full version of Acrobat, if the latter which one?
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • LOGO in PDF file (Apache FOP)

    Hi all...I'm using the Apache FOP PDF printing option with the jsp packaged in the AppEx 3.0.1 install. I would like to put a logo in the header of the generated PDF file. I made a compy of the default generic columns layout and added this to the header section in Page Template:
    <fo:block>
    Test Header Changes
    <fo:external-graphic src="file:///tmp/FastenalLogo.png"/>
    </fo:block>
    The following error is then generated in the logs:
    07/10/31 10:50:44 [INFO] Using oracle.xml.parser.v2.SAXParser as SAX2 Parser
    07/10/31 10:50:44 [INFO] building formatting object tree
    07/10/31 10:50:44 [INFO] setting up fonts
    07/10/31 10:50:51 [INFO] [1]
    07/10/31 10:50:51 [WARNING] table-layout=auto is not supported, using fixed!
    07/10/31 10:50:53 [ERROR] Error while creating area : Error creating FopImage ob ject (file:/tmp/FastenalLogo.png) : Jimi image library not available
    07/10/31 10:50:54 [INFO] [2]
    07/10/31 10:50:55 [ERROR] Error while creating area : Error creating FopImage ob ject (file:/tmp/FastenalLogo.png) : Jimi image library not available
    07/10/31 10:50:55 [INFO] [3]
    07/10/31 10:50:55 [ERROR] Error while creating area : Error creating FopImage ob ject (file:/tmp/FastenalLogo.png) : Jimi image library not available
    07/10/31 10:50:56 [INFO] Parsing of document complete, stopping renderer
    I also tried using a URL (with appropriate syntax), but that generated these errors:
    07/10/31 10:44:14 [ERROR] Error while creating area : No ImageReader for this ty pe of image (http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg)
    07/10/31 10:44:14 [INFO] [3]
    07/10/31 10:44:15 [ERROR] Could not load external SVG: http://epsilon.fastenal.c om:7784/i/FastenalLogo.jpg<Line 1, Column 50>: XML-20190: (Fatal Error) Whitespa ce required.
    07/10/31 10:44:15 [ERROR] Error while creating area : No ImageReader for this ty pe of image (http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg)
    07/10/31 10:44:15 [INFO] Parsing of document complete, stopping renderer
    Is it not possible to import an external image file into a PDF rendered by the Apache FOP? Any help would be greatly appreciated.
    Thanks,
    Leigh

    Hi Carl --
    I changed the image source to this:
    <xsl:variable name="_SECTION_NAME" select="string('master0')"/>
    <fo:static-content flow-name="region-header">
    <fo:block>
    Test Header Changes
    <fo:external-graphic src="http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg" />
    </fo:block>
    <fo:block xsl:use-attribute-sets="text text_2 text_0 #PAGE_HEADER_ALIGNMENT#">
    <fo:inline xsl:use-attribute-sets="page-header">#PAGE_HEADER#</fo:inline>
    </fo:block>
    </fo:static-content>
    I can access the image through my web browser using the URL, but my log is throwing these errors:
    07/10/31 13:01:18 [WARNING] table-layout=auto is not supported, using fixed!
    07/10/31 13:01:20 [ERROR] Could not load external SVG: http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg<Line 1, Column 50>: XML-20190: (Fatal Error) Whitespace required.
    07/10/31 13:01:20 [ERROR] Error while creating area : No ImageReader for this type of image (http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg)
    07/10/31 13:01:20 [INFO] [2]
    07/10/31 13:01:21 [ERROR] Could not load external SVG: http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg<Line 1, Column 50>: XML-20190: (Fatal Error) Whitespace required.
    07/10/31 13:01:21 [ERROR] Error while creating area : No ImageReader for this type of image (http://epsilon.fastenal.com:7784/i/FastenalLogo.jpg)
    07/10/31 13:01:21 [INFO] Parsing of document complete, stopping renderer
    Could the fo block be in the wrong place in the document? I'm not very familiar with XSL-FO and may have just placed it wrong.
    One other thing I just noticed. The webserver is actually using SSL, which on windows systems results in a pop-up about security. If I change the URL to https using the SSL port, I receive a message about security certificates.
    Thanks,
    Leigh
    Message was edited by:
    ljohnson74

  • PDF generation , FOP and Oracle Express DB

    Am I right in assuming that you can't use the FOP PDF generation utility with Oracle Express Edition Database? i.e. no oc4j directory etc..
    regards
    Paul P

    Am I right in assuming that you can't use the FOP PDF generation utility with Oracle Express Edition Database? i.e. no oc4j directory etc..
    regards
    Paul P

  • PDF Printing  APEX 3.2.1  (APACHE FOP) which OC4J version  for Oracle 11g?

    I am using APEX 3.2.1 on Oracle 11.g (under windows XP)
    I want to test PDF printing (in advanced turorial) with standard config ( APACHE FOP no Oracle BI publisher).
    When I look oracle doc : http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html)
    prerequisites for installing WAR file (Installing and Configuring Apache FOP) imply downlad for Oracle Containers for J2EE (10.1.3.2) ,
    once there : http://www.oracle.com/technology/software/products/ias/htdocs/utilsoft.html)
    the accessed page seems restricted to Oracle Application Server 10g Software Downloads.
    My question : is the last Version (10.1.3.5.0 : Oracle Containers for J2EE 10g (OC4J) (build #090727, 91 MB) - J2EE 1.4 compatible with EJB 3.0 / JPA 1.0 support ) also VALID for Oracle 11g ?

    I just installed a similar setup with the following software combination and it works.
    win32_11gR1_database.zip
    oc4j_extended_101350.zip
    jdk-1_5_0_22-windows-i586-p.exe

  • PDF Printing  APEX 3.2.1  (APACHE FOP) which OC4J version ?

    I am using APEX 3.2.1 on Oracle 11.g (under windows XP)
    I want to test PDF printing (in advanced turorial) with standard config ( APACHE FOP no Oracle BI publisher).
    When I look oracle doc : http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html)
    prerequisites for installing WAR file (Installing and Configuring Apache FOP) imply downlad for Oracle Containers for J2EE (10.1.3.2) ,
    once there : http://www.oracle.com/technology/software/products/ias/htdocs/utilsoft.html)
    the accessed page seems restricted to Oracle Application Server 10g Software Downloads.
    My question : is the last Version (10.1.3.5.0 : Oracle Containers for J2EE 10g (OC4J) (build #090727, 91 MB) - J2EE 1.4 compatible with EJB 3.0 / JPA 1.0 support ) also VALID for Oracle 11g ?
    Edited by: user10370192 on 10 nov. 2009 05:29

    marked for cancel (wrong forum)

  • PDF generation with Apache FOP.

    DB: Release 10gR2 -> 10.2.0.3
    Apex : 3.1
    OS: Linux RedHat 4 Update 6.
    Apache : 1.3 from the Companion DB CD.
    Our enviroment have been done with 10gR2 and the Companion CD Apache, are running in diferent servers.
    I was trying to follow the steps for get the apache FOP working reading the document.
    http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html#05
    Step 5.1
    Oracle Containers for J2EE (10.1.3.2)
    Available for download from OTN
    Installation instructions and configuration
    I don't see the 10.1.3.2 at OTN. Actual releases are 10.1.3.3 -> 10.1.3.4
    Can I use any other one newer?
    What to download ?
    The Oracle Containers for J2ee (OC4J)?
    Any other one?
    Thank you in advance for your help
    Jose

    As part of the ducomentation to install the OC4J. You have to have the JAVA_HOME , ORACLE_HOME and J2EE_HOME.
    According to document
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28950/install.htm#CEGBCJJH
    Question:
    If I have install the Apache from the Companion CD and my ORACLE_HOME is
    /u01/httpdev2/oracle/product/10.2.0
    The directory have the j2ee and others. If I try to install the OC4J I will be overwriting the rest of directory.
    How I install the OC4J?
    I have to create a new ORACLE_HOME?
    I have to install Application Server and then the OC4J?
    Thank you.
    Jose.

  • PDF PRINTING using Apache FOP and Oracle Containers for J2EE

    Hi,
    I am having major confusion about the pdf printing in Oracle XE and Apex 3.1.2.00.02
    It clearly states that this is an available option on the Oracle website.
    According to Apex there are two options for printing report regions.
    Standard - which is free
    Advanced - which uses BI and requires a licence
    Standard requires me to have Apache FOP (which is provided by Oracle in the Apex release) and Oracle Containers for J2EE (OC4J)
    Where my understanding of all this falls down is the part where I am downloading the Oracle Containers for J2EE and the license agreement states this cannot be used in a production system (only as a protptype). Can anyone clarify this? This is surely a required componenet and for the standard report printing which is supposed to be free.
    My problem is that I need to have a database system on a laptop that will go off site for a number of weeks. We need report printing options.
    Can anyone help with this. im desperate.
    Kind regards
    colin mclay

    no not yet with Application Server.
    I have tried to compare the settings to another installation with a separeted oc4j as described in the howto. But at the moment i found no mistakes.
    If i call the url adresse like:
    http://localhost:18101/fop/apex_fop.jsp
    i get:
    500 Internal Server Error
    Servlet error: java.lang.ClassNotFoundException: fop.apex__fop
    I installed it another time with these settings:
    Web Anwendung= .../fop.war (selected war file from apex install directory)
    Anwendungsname= fop
    URL zuordnen= /fop
    I would like to know if its possible to use the fop.war out of apex install directory with the Application server? In the standalone version (as described in howto) it works. But if you install it there you don't need to define an URL.
    Is the URL /fop correct or what do i have to insert there?

  • PDF generation with FOP throws NPE

    Hi,
    Stack trace
    at oracle.xml.jaxp.JXTransformer.reportXSLException(JXTransformer.java:769)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:342)
    I'm using standard Java 1.4 API calls to create a PDF document from a DOM with Apache FOP 0.20.5.
    The servlet is deployed to Oracle 10g Application Server 9.0.4.0.0. With Tomcat 4.1.30 the same code executes without exceptions
    Because I have to port our web application to Oracle for a new customer it is important for me to get this fixed soon.
    Thank you
    Eckard

    Light at the end of the tunnel: It seems to work when FO and PDF generation are separated. Until now the DOM was piped into FOP who internally created the FO from SAX events and then seems to parse it again to create PDF.
    I separated the two steps: There is no problem in FO generation, but due to a namespace problem subsequent parsing fails
    ("org.apache.fop.apps.FOPException: null:2:10 Root element is missing the namespace declaration: http://www.w3.org/1999/XSL/Format")
    Now the correct exception comes up. Whether FOP SAX event listener is buggy or XML parser's error handling has a problem, I don't know
    Thank you anyway
    Eckard

  • PDF printing by Apache FOP : what are the prerequisites ?

    Hello,
    I'm actually looking for a way to print reports, and I've 2 questions :
    1) If I'm not wrong there are three means : BI Publisher, Apache FOP and an other XSL-FO like Cocoon...
    -> For budgetary reasons, we can't use BI Publisher.
    -> Besides, my company owns the Oracle Standard Edition, so I'm not even sure we can use Apache FOP : in every documentation FOP is deployed in App Server or Enterprise Manager, and we don't have those. OC4J seems installed on our server but it may not work without Application Server...
    -> So is Cocoon the solution ?
    2) We're about installing Apex 4.0. We want to be able to print interactive reports, with aggregations and sums. Does it possible and are there differences between report engines ?
    Thanks a lot !
    Fanny

    Hi Fanny,
    I stand to be corrected, but my understanding regarding OC4J licensing is this.
    OC4J can be downloaded and installed in standalone configuration from OTN under the OTN license, which is fairly restrictive and means that it cannot be used for production or commercial purposes. This applies whether it is installed on the database server or on a separate server. In order to license it you need to buy an OAS or Weblogic license. This is in contrast to Oracle's HTTP server, which can be installed standalone and is included in the database server license provided it is installed on the same server as the database. If the HTTP server is installed on a separate server to the database then it too requires an OAS or Weblogic license.
    My guess for this anomally is that the HTTP server is based on Apache, an open source product and it was originally installed as part of the database up until version 9i. After that it was separated out as a companion product. Where as OC4J is based on a proprietary product called Onion, which Oracle acquired. Commercially going forward, Oracle is pushing Weblogic. If you want a free app server then you can opt for the free version of Glassfish, an Oracle product or Tomcat.
    If you do need a supported environment you can also get Standard One versions of Weblogic and OAS which are considerably cheaper than the Enterprise versions and you can get a supported version of Glasfish for around the same cost.
    You should also note that Oracle BI plus OAS or Weblogic is a complete development and deployment product for business intelligence reporting, whereas Apache FOP and an app server is purely a deployment environment. If you wish to do something more sophisticated than the standard PDF option available in Apex, which is pretty basic, you will need to acquire some sort of XSL-FO production tool. As alluded to previously, Java4less produce a minimally priced one, but there are others in the market place.
    Regards
    Andre

Maybe you are looking for

  • SAP Purchasing report : GR Quantity values

    Hi All,   We have a purchase variance report in which the GR Quantity value is not matching the Production server data can someone tell me how the actual GR Qty is calculated because on a posting date for a PO And for Material i see a GR Qty has +ve

  • Scanning conflict   Acrobat 9 pro   "Color Format Selected Not Supported"

    I have had several conflicts with Adobe Acrobat 9 and my HP C5180 printer/scanner/copier.   I have downloaded new drivers from HP.   When I try to create  a PDF from the scanner,  I get this conflict warning:   "Color Format Selected Not supported". 

  • Why is the iTunes download on XP failing?

    I've tried to download the  iTunes executable file onto my XP numerous times this evening via Firefox. I confirmed that I'm downloading the version for Windows, and I've confirmed that I have Service Pack 2. I direct it to save onto my desktop, but i

  • Xsd to java code?

    Hi all, just wondering if anybody knew any code generating frameworks that generated java code to help in parsing an xml file with a given xsd validation file. Much the same way jakarta turbine does for sql? thanks, Jon

  • Patch for error code 2131 when burning CDs in itunes for Toshiba computers:

    Just today, Toshiba posted patch for the infamous "error code 2131" when trying to burn CDs in itunes on many Toshiba laptops. Lucky for me, today was the first time I tried to do so, but I feel for all you other folks who have been very frustrated a