FOP PDF FILE

Hello everybody.
Im testing FOP and looking for the best way to use it.
I see that there is many handicaps in it, (by example, you cannot print photos, pics etc the master detail you can do a litle but not much etc).
Also you must use OC4J Standalone for use it. (I think it is not necesary).
FOP is a java program that use 2 files like input (the XML file like source data & the XLS-FO like source of formating) with this 2 files FOP give you 1 file, that can be in various format (PDF mainly).
My question is :
Is there any way to call the FOP java program by command line?
I think that this can be a road to explore.
If anybody have a idea about this please tell me.
Regars everybody.

"selezeus"
You don't need to use OC4J stand-alone, you can use the version that ships with the database, and you should be able to use other J2EE containers as well. You can also follow Carl Backstrom's example for how to hook up Apache Cocoon. In order to be able to better support our customers though, we have documented only one specific setup, where we know the versions of the different components, etc.
When you open up (unzip) the fop.war file we provide, you'll find a file called apex_fop.jsp. That file should give you see information you need for programming your own interface.
Regards,
Marc

Similar Messages

  • PDF: How to get date/time into the heading of a FOP/PDF file?

    Hi!
    What changes do I need to make to the PDF report template or what else can I put in the heading block of the "Print" page so that it will include the date and time the PDF was generated?
    Also how would I add this so that it prints on the bottom of the page like the page number?
    Thanks in advance for any tips, tricks, ideas, examples, etc.!
    Dave Venus

    Hi!
    Perhaps I missed this some place but you can get the value of a page item or application item into the header or footer of a (FOP) PDF report by using a "&<item>." format substitution string. For example I have a 1 time application process that puts todays date in an application item named F106_SYSDATE (F106_ is the application id). Then in my headers I use:
    XXXX Report on: &F106_SYSDATE.
    Simple. Works great! And better yet my users are a little happier! :)
    Thank for everyone's help and suggestions!
    Dave Venus

  • 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

  • Recover PDF file from FOP

    Hello everybody.
    I have install the OC4J with Apache FOP for printing PDF Files from Apex. All near work good, I have some problems with ORMI server, but sometimes it work good.
    My question is, when I call the the OC4J from Apex it work good and open the Adobe Acrobat and show the PDF file. But I want manage this file, I want take it and can work with it . From where I can read it?
    Regards everybody.

    Not, I must to be wrong. I think that PDF files that I see in /tmp directory was store by the browser download or by the PDF reader application, not by OC4J & FOP.
    I start Enterprise Manager Apliccation Server Control of OC4J and in the property settings of FOP application I see that the temporal directory was /temp (and this directory dont exist in my server) I change this with a new temporal directory, but after stop and restart HTTP Server and OC4J, and send to print a new report nothing was in this directory, it was empty.
    Now I think Im more near solution, but not find yet.
    Regards.

  • Generating PDF file using FOP API in Web Dynpro

    Hi experts,
    I would like to generate PDF files from a WebDynpro application without using Adobe Interactive forms.
    I think that I can export context data to XML stream and then apply XSLT transformation to produce XSLFO format and then pass it to xlfo processor i.e FOP to generate the PDF file.
    Has someone already try this way of generating PDF files?
    Is it a good way of processing ?
    Thanks in advance.
    Thomas.

    hi Thomas,
    You can make use of the iText API to create pdf documents through webdynpro.
    For this you'll have to download  the Itext api jar file.
    Right click your webdynpro project include this jar file using the 'add external jar files'.Now you'll be able to make use of this api in your webdynpro project.
    http://javaboutique.internet.com/tutorials/iText/ .
    The above link will help you in using iText API.
    hope this one helps you.
    Regards,
    Rahul.

  • Providing security to the PDF file using apache FOP in java

    I am working on PDF file generation using Apache FOP, I have security concerns which are
    1. PDF file will be placed in a folder after generation and that should not be copied to other locations.
    2. PDF file should only have an option print nothing else. The save/save as options should never be enabled.
    3. PDF expiry date is required, so that PDF file will get expire after duration.

    HI,
    I did that too, with too much experiments.
    Code snippet for reference.
    PdfReader reader = new PdfReader(getOutputFilePath());
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("my-new-file.pdf"));
    stamper.setDuration(1,1);
    int permissions = PdfWriter.HideMenubar & PdfWriter.HideToolbar & PdfWriter.HideWindowUI & ~( PdfWriter.AllowCopy | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowFillIn | PdfWriter.AllowAssembly | PdfWriter.AllowModifyContents | PdfWriter.AllowScreenReaders);
    stamper.setEncryption(null, null,
    permissions, PdfWriter.STRENGTH40BITS);
    stamper.setFormFlattening(true);
    System.out.println(stamper.getMoreInfo());
    stamper.close();
    I am able to disable the save button, but I am unable to disable the save as option.
    It would be great help, if you can give some inputs on this.

  • FOP Serializer, PDF File generation

    In attempting to generate PDF files from XSQL: Any ideas which jar files from the Apache FOP-0.20.5 release need to be included in the classpath of the XSQL servlet (XDK 9.2.0.2.0) to make the emptablefo.xsl demo function? Are there other jar files required (other than xsqlserializers.jar)? The docs seem to want w3c.jar, which doesn't come with that release. Where does one find it, if needed?
    I keep turning up with
    XSQL-017: Unexpected Error Occurred
    java.lang.NoSuchMethodError
    at oracle.xml.xsql.serializers.XSQLFOPSerializer.serialize(XSQLFOPSerializer.java:19)
    Is my Adobe plugin meant to fire up if this works correctly?
    Cheers

    Hi All,
    I got the latest FOR version and have all the orther jars in my class path. I am using XSQL and with the previous version of FOP, my PDF display was fine.
    With the new version of FOP i am having the problems mentined on this forum.
    As 12... suggested, i got the XSQLFORSerializer , compiled and added it in the jar(xsqlserializers.jar) and added the jar in my class path, added the other mentioned jar(except xercesImpl-2.2.1.jar since xerces1-2.3.jar is in the class path and adding xercesImpl-2.2.1.jar causes JRun not to start with some kind of weird Null TLD string "--" cannot be in the comments error).
    Everything looks fine ,just that the pdf does not show and the message is
    07/01 10:47:23 user CacheFilesServlet: Processing XSQLRequest...
    [INFO] java.lang.NullPointerExceptionbuilding formatting object tree
    at org.apache.fop.pdf.PDFDocument.outputHeader(PDFDocument.java:1321)
    at org.apache.fop.render.pdf.PDFRenderer.startRenderer(PDFRenderer.java:
    237)
    at org.apache.fop.apps.StreamRenderer.startRenderer(StreamRenderer.java:
    188)
    at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:240)
    at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:454)
    at org.apache.fop.apps.Driver.render(Driver.java:498)
    at org.apache.fop.apps.Driver.render(Driver.java:518)
    at oracle.xml.xsql.serializers.XSQLFOPSerializer.serialize(XSQLFOPSerial
    izer.java:38)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:257)
    at oracle.xml.xsql.XSQLRequest.process(XSQLRequest.java:304)
    at oracle.xml.xsql.XSQLRequest.process(XSQLRequest.java:198)
    at com.cleverdevices.util.CacheFilesServlet.generateReport(CacheFilesSer
    vlet.java:1045)
    at com.cleverdevices.util.CacheFilesServlet.doGet(CacheFilesServlet.java
    :372)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at jrun.servlet.security.StandardSecurityFilter.doFilter(StandardSecurit
    yFilter.java:102)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:
    241)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:
    527)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo
    l.java:348)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
    ava:451)
    at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.
    java:294)07/01 10:48:04 user CacheFilesServlet: output length = 0
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    com.cleverdevices.util.ReportGenerationException: No output from XSQL
    at com.cleverdevices.util.CacheFilesServlet.generateReport(CacheFilesSer
    vlet.java:1065)
    at com.cleverdevices.util.CacheFilesServlet.doGet(CacheFilesServlet.java
    :372)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at jrun.servlet.security.StandardSecurityFilter.doFilter(StandardSecurit
    yFilter.java:102)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:
    241)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:
    527)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo
    l.java:348)07/01 10:48:04 user CacheFilesServlet: Deleting bad cache file: C:\JR
    un4\servers\default\tatools\main\reports\cache\whc_kneel_bu
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
    ava:451)
    at jrunx.scheduler.ThreadPool$UpstreamMetrsdepot_dd_1,,_20040630.pdf
    ics.invokeRunnable(ThreadPool.java:294)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    com.cleverdevices.util.ReportGenerationException: IO Error: com.cleverdevices.ut
    il.ReportGenerationException: No output from XSQL
    at com.cleverdevices.util.CacheFilesServlet.generateReport(CacheFilesSer
    vlet.java:1076)
    at com.cleverdevices.util.CacheFilesServlet.doGet(CacheFilesServlet.java
    :372)
    Any pointers will help.
    I am using XSQL and JRun server.
    Thanks

  • Deploying the fop.war file for PDF printing

    I suppose this should maybe be in the App server thread but im following instructions from here to enable PDF printing in APEX
    http://www.oracle.com/technetwork/developer-tools/apex/application-express/configure-printing-093060.html#05
    The instructions are a bit out of date but
    I navigate to the OC4J home > select applications > Deploy WAR file
    browse for the fop.war file on local machine
    for Application Name i have ApexFOP
    for Map to URL I have /apex/fop
    then I click Deploy
    it says succesfully loaded but when I click on the ApexFOP in the Deployed applications list it says not loaded
    I have re-started the OC4J
    any help would be very gratefully recieved , I'm going nuts trying to do this
    Cheers

    I copied an existing working structure and this worked for me.

  • Print pdf file

    Hello everybody.
    I have installed Oracle Database 10.2.1, Http server that comes with its companion cd, APEX 3.0.1, OC4J Standalone and Apache FOP, all in one computer. Now all good except by ORMI server that dont work enough good. All this in Linux Red Hat ES/AS 4.
    I have done a report and I HAVE MY FIRST PDF REPORT, but in screen and first I must to do a normal Apex Report and from this lunch the FOP. I think that must have a mistake in this.
    ¿What I want to do ? easy , call the FOP from a buttom, it generate a PDF file, I take this and print in the printer of my custom with javascrip or any other tool.
    Questions ,
    1º) How I can generate the PDF file without first must to show the first page of it.
    2º) From where I can take the PDF file generated by FOP?
    Any idea wellcome.
    Thanks & Regards to everybody.

    Hi!
    You need to use application level items instead of page level items. Application items can be populated from page items or thru a computation or a page process or an application process, etc.
    You will need to check the SQL of your report and change it to use the application items instead of page items.
    I have set up application items for things like report begin and end dates, etc.
    Another option is to pass them in the URL you are using to run the report. See the documentation on f?p.
    Let me know if you need more info.
    Dave Venus

  • How to create the PDF file in WebDynpro?

    Hi.
           How to create PDF file in Webdynpro?
    I have one WD screen In there i have one File Download action. Once i click that it will open one PDF file which consisting of all details.
    Pls reply me.
    with regards,
    Gobintah.R

    Hi
    Check these links
    Re: Opening a PDF File from WebDynpro
    Re: Generating PDF file using FOP API in Web Dynpro
    http://help.sap.com/saphelp_nw04/helpdata/en/1a/ff773f12f14a18e10000000a114084/frameset.htm
    Thanks
    Edited by: Anup Bharti on Oct 16, 2008 11:51 AM

  • Cyrillic Characters not shown in pdf file when xsl is parsed part 2:

    I am using Fop to create a pdf file from an XSL file, an XML file and a ApplicationResources.properties file.
    The XML file is populated by a Java class, where the information is taken from a Russian Database. This XML file is them used to populate the XSL file.
    The ApplicationResources.properties file, is in windows 1251 format, as we converted it using NativeToAscii converter.
    I downloaded a cyrillic ttf file, and created a metrics file, according to the Fop website. And I had Russian appearing on my PDF from the database (not ApplicationResources.properties file though). However, the information which we were retrieving from the database would not display on the jsp pages which are part of the same application.
    To fix this, we changed our database driver from a ODBC-JDBC driver, to an oracle thin type 4 driver.
    Since this happened, my cyrillic characters no longer appear on my PDF file.
    I know that the information from the database comes back in windows 1251 format, so I tried to put the
    <?xml version="1.0" encoding="windows-1251"?>
    and
    <?xml version="1.0" encoding="Cp1251"?>
    but when I do this, I get the following error in my log file:
    L2|14:14:58:433|ExecuteThread-9|PDFService.generatePDF: class com.petrotechnics.skyobma.service.SkyobmaServiceException Exception :javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The encoding "Cp1251" is not supported.
    or the windows-1251 is not supported.
    I do not know what to do at all, I am really struggling and was wondering if anyone had any idea about where I can go from here, or even if someone can just tell me I am fighting a loosing battle I would be happy.
    Yours Truly Hopefully,
    Gillian Daniel

    either you configure FOP to use a SAX Parser that supports Cp1251 or you encode your XML data to UTF-8.
    we flawlessly generate Greek PDF documents out of data selected from Oracle 8.1 by using UTF-8.

  • How to generate a pdf file from Excel

    Hi all,
    I've a Excel file i want to generate a pdf file by using java...can any one explain wht r the things r required. If ur answer is "iText" or "apache FOP" then wht r the things to be needed...I want to know the exact answer...step by step....plz help me out...
    Eagarly waiting for reply...
    regards
    [email protected]

    hi,
    I've a idea on jdk,,,i need to know who to use FOP packages?
    regards,
    [email protected]

  • Saving the web content to a pdf file

    How do I save the web content which is basically a report to a pdf file?

    There are a number of options. If you are familiar with XSL-FO, you can use Apache's FOP to produce PDF. You can use i-Text to work with java objects that generate PDF elements. I believe there are also additional offerings. However, both of the above are free.
    - Saish

  • PDF file contents of word document using XSLT.

    Hi Public,
    I am creating pdf file through the XML, XSL and FOP. I want PDF file contents to display external file contents such as word document.
    I know for displaying image in PDF we use <fo:external-graphic> but what tag we should to display file contents other than pdf file type.
    Thanks in advance.
    Rahul

    Your instructions for doing this are very clear. 

  • XSL-FO and watermark on PDF file generated.

    I am using XSLT / XSL-FO to convert my XML to PDF file for the users to take a printout. Under certain conditions I need to have a watermark COPY on the printed paper . Can XSL-FO/XSLT do this for me under certain conditions? Or has this something to do with the paper in printer having the COPY watermark.
    Thanks

    See http://xml.apache.org/fop/output.html#pdf-watermark
    I know one more solution with table occupying entire page, with minus padded repeated header:...
    <fo:flow  flow-name="xsl-region-body">
        <fo:table>
            <fo:table-column column-width="170mm"/>
            <fo:table-header>
                <fo:table-row>
                    <fo:table-cell padding-bottom="-257mm">
                        <fo:block>place background here</fo:block>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-header>
            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell><fo:block>place document content here</fo:block></fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>
    </fo:flow>Customize padding of the header cell to place your watermark where you want on the page.

Maybe you are looking for

  • Blue Screen of Death \ No screen or response after waking up from sleep\hibe​rnation

    Hey, i have Yoga 2 Pro, Windows 8.1 64x, All my drivers and BIOS are up to date (Latest version from lenovo's Y2P support drivers downloads or even newer) i have an active anti-virus (avast free) and i have these issues since day 1 with this PC. The

  • Excel macro error after deploying in Weblogic

    Halo, I have written excel macros and it is working fine. but if the same file if i try to open from hyperlink after deploying in Weblogic server , I get the error "error occured initializing the VBA libraries. If Microsoft Visual Basic for Applicati

  • Are there any Mail 4.2 (Snow) template for replies?

    I used to MailTemplateEditor add on by: http://mactank.com/, and it worked great. I answer my customer support emails from my iMac. I just upgraded to Snow Lepoard and the add-on does not work anymore. This is the most important piece of software I u

  • Redirect Sign out of a dashboard in Oracle BIEE

    Hi I have a requirement to change the Sign Out link of our BI Dashboard to redirect to a different web page. What is the best way of going about this? Thanks

  • MacBook and OS X

    I am trying to download OS X from App Store, but it says it's paused. I went into purchases and it gives me the option to download it, but when I click nothing happens. There are no options to resume the download. What do I do next?