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

Similar Messages

  • PDF generation with FOP

    Hello, I'm trying to create a simple XML2PDF generator using FOP but I get the following error after executing:
    "PDFGenerator.java": Error #: 314 : cannot access class org.apache.avalon.framework.logger.Logger; neither class nor source found for org.apache.avalon.framework.logger.Logger at line 61, column 20
    "PDFGenerator.java": Error #: 300 : method setLogger(org.apache.log4j.Logger) not found in class org.apache.fop.apps.Driver at line 61, column 20
    I've tried using log4j but Driver.setLogger won't accept it because:
    "PDFGenerator.java": Error #: 314 : cannot access class org.apache.avalon.framework.logger.Logger; neither class nor source found for org.apache.avalon.framework.logger.Logger at line 61, column 20
    "PDFGenerator.java": Error #: 300 : method setLogger(org.apache.log4j.Logger) not found in class org.apache.fop.apps.Driver at line 61, column 20
    Any ideas?
    Thanks.

    cannot access class org.apache.avalon.framework.logger.Logger
    Add
    avalon-framework-cvs-20020806.jar to Classpath.

  • SVG in pdf created with FOP

    Hello,
    is it possible to include SVG`s to a pdf report, which is created with FOP?
    I read something like Batik....
    Does anybody have any experiences about that?
    Thanks,
    Tim

    Thank you, CtDave, for your speedy reply and for the 'Acrobat Technical Evangelist' knowledge base article. Word 2000 is one of Microsoft's masterpieces - by disabling 'autosave', the application is totally stable, does not require 'activation' by Microsoft. Acrobat 9 enables 'saving' of interactive .pdf forms, a most valuable feature and one much appreciated by anyone completiing such forms. There must be more to this issue than 'incompatibility', because I can create a test Word 2000 document, hyperlink a valid URL, convert to .pdf with Acrobat 9, and the hyperlink works fine in Acrobat 9. When I attempt to do this using a much more complex Word 2000 document, embedded with scores of hyperlinks, these links fail to work following conversion to .pdf with Acrobat 9, but work fine following conversion to .pdf with  Acrobat 6. I can then use Acrobat 9 to open the .pdf created with Acrobat 6, and successfully edit any of these fully functional hyperlinks using the 'Link tool'. I don't know who prepared the 'Acrobat Technical Evangelist' article (AF1908DCd01) - no credits were cited, and I'm far from certain that this authentically belongs to Adobe's knowledge base. So I appreciate your sharing this information with me, but I cannot say that my question has been definitively answered. If you have any further information or tips, please reply in this thread. /rmbrown

  • PDF Printing with FOP/Apache Tomcat/J4LFOPServer in windows

    Hi everyone,
    I have been learning to create pdf report with Apex 4.2 and BI Publisher 10 which I have been successful with. Now I like to learn how to create pdf reports using FOP thinking of the customers who will not spend money on BI Publisher. I have gone through the documents and procedures described in Java 4 Less. http://www.java4less.com/apache/fop.php and http://www.java4less.com/fopdesigner/fodesigner.php?info=apex. Configured Apex instance setting accordingly.
    For default layout a tabular pdf report is created.
    I have created an xsl-fo file named Formatted_report.fo on same query and xml file from report query with BI Desktop. But when I try to print a formatted output with Formatted_report.fo report layout it does not work(J4LFOPServer ). but same layout with .rtf template works fine (BI Publisher Print Server).
    Please help
    Hasan Al Mamun
    Programmer/Assistant Systems Analyst
    Bangladesh Bank
    Dhaka, Bangladesh
    Edited by: 913230 on Dec 15, 2012 9:37 AM

    hi,
    if you use the J4lFOPServer as you write, you can set it in debug mode as described here:
    http://www.java4less.com/apache/fop.php?info=faq#debug
    you will then see the XML data and the FO data in the server window. Maybe you can see there if there is an error and that can help you fixing it.
    Jon

  • PDF Generation with LiveCycle Data Services

    Hi everybody!
    I am using LiveCycle Data Services to generate a dynamic pdf. I worked with this tutorial : livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/pdfgen_1.html and i adapted the code to my own example.
    I created a pdf template with livecycle designer and i succeed to generate the pdf thanks to LiveCycle Data Services.
    Here is my problem :
    In LiveCycle Designer i create a table and bind my data connection (from xml source) to this table and i bind subforms to repeating data.
    It works when i try to open an overview of the pdf with LiveCycleDesigner.
    But when i try to generate the pdf with livecycle data service, there is no repeat of my data. There is only a number of items corresponding to the minimum of repeating i set in livecycle designer binding window...
    Is it possible to generate repeating data with LiveCycle DS ?
    an example of my xml source :
    <item id="1">
         <data>blabla</data>
    </item>
    <item id="2">
         <data>blabla</data>
    </item>
    In livecycle designer, if i set the minimum of repeating to 1,  LiveCycle DS generate a pdf with only one item.
    if i set the minimum of repeating to 2,  LiveCycle DS generate a pdf with only 2 items. etc.
    I don't know how to generate an indeterminate number of items...
    Thanks in advance for your help.
    Bye
    Guillaume

    Hi Guillaume,
    there is no limitation. Dynamic PDF files can be generated with Livecycle Data Services.
    You should have a look at the XML file generated by your Flex code. Try to save it and see how the XML file behaves when you generate a PDF preview with Designer. You can go to the menu:  File >  Properties > Preview > Use XML test data...
    With the XFAHelper class, you can either load a PDF or a XDP file. Have you tried with a XDP ?
    I've attached a dynamic PDF file that I've created for a customer. I generate a dynamic PDF file using LiveCycle Data Services. Maybe you'll find some clues within the file.
    Michael

  • PDF Printing with FOP 0.94

    Hi,
    are there any examples about printing apex report with FOP 0.94?
    Thanks,
    Sergio

    Hi!
    I am trying to get this solution working on a LINUX system using TOMCAT 6.0.18 rather than OC4J which we don't have a license for. I have tried both FOP 0.94 and 0.95 and seem to get similar problems. Here is the error message:
    org.apache.jasper.JasperException: An exception occurred processing JSP page /apex_fop.jsp at line 28
    25: // Setup XSLT
    26: System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xalan.processor.TransformerFactoryImpl");
    27: TransformerFactory factory = TransformerFactory.newInstance();
    28: Transformer transformer = factory.newTransformer(new StreamSource(new java.io.StringReader(request.getParameter("template"))));
    29:
    30: // Set the value of a <param> in the stylesheet
    31: transformer.setParameter("versionParam", "2.0");
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.NullPointerException
         java.io.StringReader.<init>(StringReader.java:33)
         org.apache.jsp.apex_005ffop_jsp._jspService(apex_005ffop_jsp.java:92)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Any hints, tips, suggestions, etc. gratefully welcomed!
    Dave Venus

  • 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.

  • Problem With PDF Generation With CFDOCUMENT

    I am having a problem with generating PDF's from my web
    pages.
    For example...if you go here
    http://www.michaelpumo.com
    and click the "Convert to PDF" link on the left you'll see that the
    output is totally wrong.
    Is it to do with my markup? I can't figure this out.
    Many thanks in advance.

    I, along with many others have had these types of problems
    and so far adobe hasn't addressed them (or at least I couldn't find
    anywhere where they have).
    Kapitaine, Have you tried outputting to flashpaper? Most of
    my formatting problems only occur in PDF.
    For instance, align right does not work properly. It pushes
    everything to the right, but is not flushed to the right so the
    output looks very unprofessional. This cfdocument was a good idea,
    and a good selling point but it is embarrassing to have sold my
    boss on it only to find out it is almost worthless in it's current
    state. BTW I'm working on a CFMX7.0.2 on Linux RHEL4.

  • Bug in PDF generation with Report Builder CF8

    Hello
    there is a bug in the calculation of the left margin of a
    page.
    I upgraded from MX 7.02 to CF8. My "old" Reports worked fine,
    but when I export them to PDF an print them the left margin is
    different.
    I'm using metric settings in the Report Builder. I created a
    new Report with Left Margin 2 cm and a single Field with the left
    Property = 1 cm (0.9879 cm). The printed paper with these poperties
    where fine. I could measure appoximatly 3cm . But if I use Report
    Left Margin = 1.27 cm and Field left Property = 0.35cm. The left
    margin of the printed paper is only 1.1cm.
    So it depends on the choosen Values of report left margin and
    the left property of a field.
    Does anybody else have the same problem?

    I found this posting as I have now "rediscovered" this issue. I came to the same conclusion - edit ALT TEXT for every image.
    However, I think it is confusing that these paths of image file are not considered Personal Information that can be removed using the Inspect Document feature (I tried - was not successful). The list of things to be removed using this wizard is quite extensive
    - and some of them less visible than these file paths.
    It would be interesting to know if this is going to change with future updates of Word. Why is an ALT TEXT included at all per default? I think using the file path in ALT TEXT should be made optional. Is there a way to turn off this default embedding of
    the full path?
    As the OP I also used Office 2013 on Windows 7 64bit.
    Elke

  • Automating PDF Generation with InDesign

    Is it possible for InDesign to retrieve info from a database, automatically format the data with paragraph style(s) and export hi-res PDF art for each database entry? PDF export to include common art positioned on the master page. If this function is possible with InDesign, how does one accomplish this task?... AppleScript? I don’t speak code, so this could be very intimidating. Recommendations?

    I think you might need an interpreter. I speak code, sure, but very slowly and with a very thick accent.
    Plain vanilla InDesign won't hit a database; there are plugins for that. Catalog plugins, for example; if you're making something catalog-like, that's worth a search or three. If you can get CSV files from your DB, then Data Merge will work for minor automation. Read up on InDesign's XML capabilities if you need something more robust than that; it is extremely useful, and even someone like myself with barely-there software development skills can automate the production of a dictionary with XML spat out of a database.
    In terms of automating the the formatting, XML is another obvious choice, because the working method is to map an XML tag to a style.
    Exporting PDFs automatically is something that can be achieved with scripting, either Apple- or Java-. I don't know off the top of my head how to set it up, but there are quite a few talented scripters reading these forums, and perhaps one of them can nudge you in the right direction. Perhaps you'll see the advantage in actually contracting one of them to develop this for you.
    All that being said, I'd be surprised if there wasn't already a catalog plugin to do exactly what you want. (The last time I said "InDesign can't really do that" it took about fifteen minutes for the forum regulars to post both a plugin and a custom-developed script that basically completely fulfilled the original poster's criteria.)

  • PDF Generation with database fields

    Hi!
    Well I have some questions and I was wondering if someone
    would be kind enough to answer. Here it goes.
    Scenario:
    The company that I work for is a non-profit educational
    institution. They wish to do a tax receipts project in which a
    student can log on to our website and get a tax receipt for all the
    courses they've take with us in the calendar year.
    The data for the student resides in a SQL Server 2000
    database table. The tax receipt has to be presented in a PDF
    format. We have a PDF template that we have to use. Essentially,
    the PDF template has to populated with values from the database.
    Technical Environment: CF7, SQL 2K, Win 2003 Server, IIS 6.
    Constraints: output has to be PDF format, can't upgrade to
    CF8
    Question 1:
    Can a PDF document be populated with values from a database
    in ColdFusion 7??
    Question 2:
    If so, o you know of a book/website in which this type of
    work is detailed (a how-to)?
    Question 3:
    If the answer is "no" to the above, is there a tool that can
    be used to accomplish this?
    Thank you in advance! :)
    Jolmes

    > Does anyone know if XPAAJ.jar is still available for CF7
    users?
    No, I do not. For forms, you could do something similar with
    iText. An older version of it is built into MX 7. Here is an
    adaptation of a simple java example from the iText site. Google for
    more examples.
    http://cfsearching.blogspot.com/2007/12/getting-started-with-itext-part-15.html

  • Automating PDF Generation with Server-Side Acrobat - Benefit, Risks, Suggestions?

    Looking for some clarity...
    How feasible is it to automate PDF creation from Excel using Acrobat, as opposed to some third-party tool? 
    The SDK seems out of date.  Any issues programming with .NET?
    Are there better products out there, from third-party providers?
    Suggestions?

    The product replaced Distiller Server, but does much more than that. That used to be $5000-$10000, I believe, but LiveCycle products are a custom quote.
    The price is set high partly because it can replace a whole office full of Acrobat licenses, one reason (but not the only one) why enterprise level products are in a different universe pricingwise. I'd expect to pay at least to match 100-200 lost sales of Acrobat.

  • PDF Generation with Digital Signature

    Hi All,
    We have a requirement to attach digital signature to the generated PDF output.
    I am trying to use 'SSF' function modules from the function group 'SSFG' to achieve this.
    Can anyone let me know the detailed steps to attach digital signature to a file and later verify it from the customer's end?

    Hi.....
    Thnq for the reply.
    I think its not a correct procedure.
    Its not a just a simple image that is uploaded into SAP and can be used.
    For putting a Digital Signture one has to buy a certificate from a authority ,
    with that certficate one has a set of Public and Proivate key... and algorithm which checks whether the PDF is changed after the sign is done.
    and Most of all the Signature is legal Binding and can be Sued
    so we cannot do that
    regards

  • Problem in IAS Server with generation of PDF with FOP and XML parsing

    Dear co.forumers :
    We are developing an application that generates a pdf document with FOP Apache utilities, and this PDf is stored in a folder of the server. Firts of all, a DDBB data is retrieved using java ( jdbc) middleware classes ( servlets ), and with these data, the pdf is generated using FOP. In these process, he data retrieved from the DDBB is converted in a XML file , and the with the XSL FOP utility, the pdf is generated.
    In the other hand, we have another application that consults data from a java beans, using a JSP, generates a XML with the data of the beans, and with this XML, and with a XSL file generates and html , with the data and fixed text.
    Both applications have been deployed as a separated WebApp in the IAS. Both use Xalan as XML parser amb Xerces is used aswell.
    So, the problem is , after generating a pdf with the firts application, every html generated via JSP-XML-XSL transformation in the second application is shown completelly bad formated. All fixed text are wrongly composed, and the text that should appear in textFields and ComboBoxes is also bad formated. The XML with the data is well generated, so the problem is in the parsing of these XML and the conversion in html through XSL. We have to re-initiate the server and then everything goes well again. If no pdf is launched, no problem occurs with the other application.
    How an a WEB APP pplication can affect to another, installed both in different folders of the IAS ? We tried to change Xalan version and FOP version, but no result.
    Is this a Poltergeist ?? and X file , maybe ?
    Has anyone had the same problem ?
    Pleae, any help will be very wellcomed.

    A PDF document may be generated in the JDeveloper OC4J server.
    http://www.oracle.com/technology/pub/notes/technote_vohra_fop.html

  • Batch PDF Generation

    Hello,
    Currently in the process of migrating to Oracle 10g with HTML DB 1.6. Looking for possible solutions for batch generation of PDF invoices with line item detail, graphs and tabular data display. Batch sizes average around 10,000 invoices so speed and efficiency is important.
    Any comments or suggestions regarding batch PDF generation with XML-XSLT-FOP, PL/PDF, or any other approaches is greatly appreciated.
    Thanks,
    Glenn

    Hello,
    For PDF printing on this scale you would probably be much better off looking at using Oracle Reports.
    The XML-XSLT-FOP solution we created is geared more to provding a PDF download to a user during an active HTML DB session.
    Carl

Maybe you are looking for