Including image in FO fille to generate PDF using FOP

Hi, we are trying out generating PDF files in JDK1.1.7 environment by using FOP.
While we are testing we are encountering problem with writing images.
In .fo file if the image is included, it is giving the following exception.
We are of no clue regarding this. If any one can help in this regard, please help us out.
Help of any kind is greatly appreciated.
Following is the Exception:
java.lang.UnsatisfiedLinkError: parseImage
at sun.awt.image.GifImageDecoder.readImage(GifImageDecoder.java:558)
at sun.awt.image.GifImageDecoder.produceImage(Compiled Code)
at sun.awt.image.InputStreamImageSource.doFetch(Compiled Code)
at sun.awt.image.ImageFetcher.fetchloop(Compiled Code)
at sun.awt.image.ImageFetcher.run(Compiled Code)
Error while creating area : Error while loading image file:/C:\fop1.4\src\xml_fe
ather.gif : class java.lang.Exception - Image error
Hisun.awt.image.URLImageSource
Regards
Ramavardhan.

java.lang.UnsatisfiedLinkError: parseImage
means that a native library is missing (ie .dll on windows, .so on most unix, .sl on other unix). The default behaviour is to try and load librarys from the CLASSPATH variable, but apps can try to locate them in other ways.
asjf

Similar Messages

  • Problem while generating PDF using iText

    Hi:
    I have generated PDF using iText, where i have written all code in sequential flow.
    <code>
    com.lowagie.text.Document document = new com.lowagie.text.Document(PageSize.A4, 55, 5, 20, 20);
    OutputStream outputstream = response.getOutputStream();
    PdfWriter.getInstance(document,outputstream);
    </code>
    And i have added all fields in the document.
    But my problem is how to display total pagecount on all pages e.g.1\20 (because i have generated PDF sequentially)
    Also i want to add watermark on all pages.
    So, can any body help me to solve this problem?
    Thank You,
    Balaji

    sabre150 wrote:
    Maybe http://itext-general.2136553.n4.nabble.com/
    Nice pron link in there :/

  • To generate PDF using BI APIs and loadjava utility

    Hi All,
    I am trying to generate PDF using BI APIs(FOProcessor etc).
    I have generated XML data through the PL/SQl procedure and storing it in a file. This file is loacted in database tier.
    The APIs is used through a simple java program which is application tier. To test the process, I had to manually provide the XML file to the java class in order to generate PDF and it does generate.
    Now the issue is I need to load the java class to the database so that everything gets automated(loadjava utlility).
    when i try to do it, it give no class found error.
    Do I need to load the referenced classes in the java file , that is, FOProcessor,RTFProcessor,FOUtility,jdbc.driver.OracleDriver as well?
    If the above is not possible, is it possible to reference a file in database tier from application tier so that i can use the XML file as input the java class in application tier.
    thanks,
    Srik

    The only reason I am responding to this post is because the poster sent me a request through the forum message system asking for my help.
    Although I did populate PDFs with FDF data generated by web forms a year or so ago, I have since abandoned that kind of solution. It was a big headache. I found it far more stable and flexible to use html, php and css to populate forms that are almost as nice looking as PDFs.
    So my advice is, if you can possibly avoid going the FDF/PDF route, you will be better off.

  • Converting xml file with arabic content to pdf using FOP

    Hello all
    I am trying to convert a dynamically generated xml file in which most of the data comes from the oracle database with arabic content, to pdf using FOP. I have used "Windows-1256" encoding for the xml. If i open the xml generated with the internet explorer the arabic content displays properly but the pdf is not generated and the acrobat reader shows the file as corrupted or not supported. Please help me. Its very urgent.
    Thanks & Regards
    Gurpreet Singh

    There is no direct support for importing RTF from an XML extract. Perhaps feature 1514 "Mapping formatted XML data into multiline field" will be of some use. This was released in 11.0, I believe.
    Essentially you can establish paragraph and certain text formatting like bold and underline when you include the proper token information in the data. I believe this is similar to simple HTML tokens.
    Example: &lt;FIELD>&lt;P>First paragraph of data.&lt;/P>&lt;P>New paragraph with &lt;B>&lt;U>bold and underline text&lt;/U>&lt;/B>. Rest of paragraph normal.&lt;/P>&lt;/FIELD>
    The result is something like this:
    <P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P>

  • New to Lifecycle, Error while generating PDF using Output service

    Hi All,
    I am using LC 8.x for weblogic. I am using the code given in the documents to generate PDF given XDP and XML data, using Output Service. I am getting the following error,
    Exception in thread "Main Thread" com.adobe.idp.DocumentError: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: Failed to load class com.adobe.idp.DocumentFileID (see the server-side log for details)
    at com.adobe.idp.DocumentManagerClient.clientSidePush(DocumentManagerClient.java:181)
    at com.adobe.idp.Document.passivateInitData(Document.java:865)
    at com.adobe.idp.Document.passivate(Document.java:704)
    at com.adobe.idp.Document.passivate(Document.java:661)
    at com.adobe.idp.Document.writeObject(Document.java:500)
    Any help is greatly appreciated.
    Thanks
    Raghu

    Hi
    I am also doing a similar activity. and getting a IllegalStateException.
    com.adobe.livecycle.output.exception.OutputException: java.lang.IllegalStateException
    at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:141)
    at CreatePDFDocument.main(CreatePDFDocument.java:56)
    Caused by: java.lang.IllegalStateException
    at com.adobe.idp.dsc.clientsdk.ServiceClientFactory$1.handleThrowable(ServiceClientFactory.j ava:67)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:220)
    at com.adobe.livecycle.output.client.OutputClient.invokeRequest(OutputClient.java:436)
    at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:124)
    ... 1 more
    Caused by: java.lang.NoClassDefFoundError: org/apache/axis/soap/SOAPConstants
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createMessageDispatcher(ServiceClientFac tory.java:586)
    at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.getMessageDispatcher(ServiceClientFactor y.java:543)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.getMessageDispatcher(ServiceClient.java:239)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:205)
    ... 3 more
    Please give a solution for this problom.
    regards
    Ullas

  • Generate pdf using weblaout in oracle report server

    Hi all ,
    my weblogic version - weblogic 10.3.6
    report server version - 11.1.2.1
    i have created one jsp file on report server using web layout. i want to show  photo ( from cloud) on pdf.
    when i running this jsp file from rwbuilder using run weblayout , iam getting the photo on that output but when i am trying to generate pdf from URL its show me url instead of photo. can anyone resolve my problem.
    http://localhost:7001/reports/rwservlet?
    report=/home/oracle/reports/test1.jsp&destype=file&desformat=pdf
    &userid=username/password@localhost:1521/orcl&desname=/home/oracle/test.pdf

    We're also encountering this same error. Did you find a resolution?
    Thanks

  • Generating pdf using java..

    hi everybody!
    is there any API that could be used to generate PDF,WORD docs from java. For WORD, there is some API JACOB, but for some reason it won't work for me.
    suggestions and code samples are highly appreciated.
    thanks in advance,
    /rahul

    I have successfull used FOP API
    http://xml.apache.org/fop
    DS.

  • Error when generating PDF using FM 9

    I am trying to generate a PDF using FM 9 and Distiller 9. For some reason, one particular file is causing problems. When I try to generate a PDF with this file, I get the following error message:
    %%[ Error: syntaxerror; OffendingCommand: M ]%%
    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%
    Anybody know what to do when this happens?
    Thanks.

    I suppose I should provide more background. We recently upgraded to the Technical Communication Suite 2, which when this problem started occurring. Prior to that, I was able to generate a PDF from this file when I was using FrameMaker 8.
    The file in question is a chapter in a book. Using FrameMaker 9 and Distiller 9, I can create PDFs from the other files in the book. The one with which I am having problems has screenshots in it. The screenshots are GIFs that I imported as files, and I did not link to them. I did some experimenting and discovered that if I print to file and drag the PS file into distiller, the PDF generates. Also, I created a version of this chapter without screenshots, and was able to generate a PDF.
    And I am now getting a different error message:
    Adobe PDF Settings file read error in PDFX4 2008.joboptions:
    /CheckCompliance out of range
    Anybody have any thoughts?
    Thanks.

  • How to generate PDF using fonts from Extended Font Pack?

    Hello
    Extended Font Pack, available for download contains MyriadPro-Regular.otf font that has cyrillic glyphs.
    I want to generate PDF document with cyrillic unicode data  that can refer to the MyriadPro-Regular font resource without embedding font.
    Are Extended Font Pack resources CID keyed fonts or not?
    Looks like such example of PDF structure allowed me to use it only in ANSI encoding
               'Type':'/Font',
                'Subtype':'/Type1',
                 'Name': '/MyriadPro-Regular' ,
                'BaseFont':  '/MyriadPro-Regular',
                 'Encoding': '/WinAnsiEncoding',
    What values should be for `Subtype` and `Encoding` to render cyrillic unicode (UTF-8 encoded) data and use MyriadPro-Regular Open Type downloaded from adobe and installed into local system without embedding it?
    Thanks

    Sorry for the delay. I admired with investigation of this case.
    My aim is to generate PDF docs on web site that have i18ned content. ALso client does not want to deal with any font licenses (font embedding will raise question about font licensing) and to reduce PDF file size with such approach. So I'm looking for the ability to link fonts in PDF source, that can be easiely downloaded from adobe.com and installed into local desktop. With Latin group (en-us, french, german) we  can use one of the 14 standard fonts, for CJK - Adobe Asian Font pack. I was considering (Myriad Pro or Minion Pro) font resources from Extended Font pack to cover Cyrillic glyphs. I observed that such fonts are usually installed with Adobe Reader installation (MyriadPro-regular.otf). To render cyrillic glyphs I followed such steps like converted into cp1251 encoding range of the cyrillic unicode data (as you told those fonts do not support unicode encodings the same way as CID keyed asian fonts) and pointed to the Type1 MyriadPro-Regular with custom WinAnsiEncoding. One problem I faced with is - that glyphnames are differrent in diferent Extended Font pack versions. I mean that cyrillic glyphnames for the Adobe Reader 8 started from `afii100xx`, when for the Adobe Reader 9 they are named `uni0xx` for the same font named MyriadPro. I used such glyphnames in the /Differences list in PDF source. How can I generate PDF source that can be viewed successfully in both Adobe Readers version 8 and 9?

  • Generating PDF using toolbar script

    Hi All,
    I am trying to create a PDF using a toolbar script and iText libraries.
    I need to convert an MSA to a PDF.
    What I want to know is that after the PDF is created, how can I auto open it in IE without human intervention.
    Any pointers shall be highly appreciated.
    Regards,
    Himanshu

    Hello,Expert,
    we tried creating the PDF using the following script, and got an error. Could you please give me some adviece about it!!
    Many thinks..
    the Script is:
    para = new Paragraph("asdsadsdsadsadas");
    Document doc1 = new Document();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    PdfWriter.getInstance(doc1,bos);
    doc1.open();
    doc1.add(para );
    doc1.close();
    FileInputStream nos = new FileInputStream(bos);
    //newAttachment = TypeFactory.createAttachment();
    //newAttachment.setFileData("Vendor Admit Certificate",nos,doc,session);
    The Error Message is:
    Typed variable declaration : Constructor error: Can't find constructor:
    java.io.FileInputStream( java.io.ByteArrayOutputStream ) in class: java.io.FileInputStream

  • Arabic pdf using FOP

    hello all ..
    i m able to generate the pdf in arabic format using FOP 0.20.4 but the problem is that the data that comes from database (arabic data in oracle database) is not displayed properly and the direction of the data is not correct. Please help me if someone has tried to generate the arabic pdf.
    thanks in advance
    gurpreet singh

    No i m not using iText. I m using FOP. But if u know
    the solution for iText then please help me as i tried
    to use that too but arabic data is not displayed.
    Gurpreet SinghKaaka, yeh dekho. http://itextdocs.lowagie.com/tutorial/#part3
    There are a number of examples using Unicode and fonts- they might be of some help.
    I am not too familiar with iText, so you may want to ask specific questions over there.
    Here is a link for FOP:
    http://www.javaranch.com/journal/200409/CreatingMultipleLanguagePDFusingApacheFOP.html

  • Generate PDF using Managed Bean with custom HTTP headers

    Background
    Generate a report in various formats (e.g., PDF, delimited, Excel, HTML, etc.) using JDeveloper 11g Release 2 (11.1.2.3.0) upon clicking an af:commandButton. See also the StackOverflow version of this question:
    http://stackoverflow.com/q/13654625/59087
    Problem
    HTTP headers are being sent twice: once by the framework and once by a bean.
    Source Code
    The source code includes:
    - Button Action
    - Managed Bean
    - Task Flow
    Button Action
    The button action:
    <af:commandButton text="Report" id="submitReport" action="Execute" />
    Managed Bean
    The Managed Bean is fairly complex. The code to `responseComplete` is getting called, however it does not seem to be called sufficiently early to prevent the application framework from writing the HTTP headers.
    HTTP Response Header Override
    * Sets the HTTP headers required to indicate to the browser that the
    * report is to be downloaded (rather than displayed in the current
    * window).
    protected void setDownloadHeaders() {
    HttpServletResponse response = getServletResponse();
    response.setHeader( "Content-Description", getContentDescription() );
    response.setHeader( "Content-Disposition", "attachment, filename="
    + getFilename() );
    response.setHeader( "Content-Type", getContentType() );
    response.setHeader( "Content-Transfer-Encoding",
    getContentTransferEncoding() );
    Issue Response Complete
    The bean indirectly tells the framework that the response is handled (by the bean):
    getFacesContext().responseComplete();
    Bean Run and Configure
    public void run() {
    try {
    Report report = getReport();
    configure(report.getParameters());
    report.run();
    } catch (Exception e) {
    e.printStackTrace();
    private void configure(Parameters p) {
    p.put(ReportImpl.SYSTEM_REPORT_PROTOCOL, "http");
    p.put(ReportImpl.SYSTEM_REPORT_HOST, "localhost");
    p.put(ReportImpl.SYSTEM_REPORT_PORT, "7002");
    p.put(ReportImpl.SYSTEM_REPORT_PATH, "/reports/rwservlet");
    p.put(Parameters.PARAM_REPORT_FORMAT, "pdf");
    p.put("report_cmdkey", getReportName());
    p.put("report_ORACLE_1", getReportDestinationType());
    p.put("report_ORACLE_2", getReportDestinationFormat());
    Task Flow
    The Task Flow calls Execute, which refers to the bean's `run()` method:
    entry -> main -> Execute -> ReportBeanRun
    Where:
    <method-call id="ReportBeanRun">
    <description>Executes a report</description>
    <display-name>Execute Report</display-name>
    <method>#{reportBean.run}</method>
    <outcome>
    <fixed-outcome>success</fixed-outcome>
    </outcome>
    </method-call>
    The bean is assigned to the `request` scope, with a few managed properties:
    <control-flow-rule id="__3">
    <from-activity-id>main</from-activity-id>
    <control-flow-case id="ExecuteReport">
    <from-outcome>Execute</from-outcome>
    <to-activity-id>ReportBeanRun</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <managed-bean id="ReportBean">
    <description>Executes a report</description>
    <display-name>ReportBean</display-name>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    The `<fixed-outcome>success</fixed-outcome>` strikes me as incorrect -- I don't want the method call to return to another task.
    Restrictions
    The report server receives requests from the web server exclusively. The report server URL cannot be used by browsers to download directly, for security reasons.
    Error Messages
    The error message that is generated:
    Duplicate headers received from server
    Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.Nevertheless, the report is being generated. Preventing the framework from writing the HTTP headers would resolve this issue.
    Question
    How can you set the HTTP headers in ADF while using a Task Flow to generate a PDF by calling a managed bean?
    Ideas
    Some additional ideas:
    - Override the Page Lifecycle Phase Listener (`ADFPhaseListener` + `PageLifecycle`)
    - Develop a custom Servlet on the web server
    Related Links
    - http://www.oracle.com/technetwork/middleware/bi-publisher/adf-bip-ucm-integration-179699.pdf
    - http://www.slideshare.net/lucbors/reports-no-notes#btnNext
    - http://www.techartifact.com/blogs/2012/03/calling-oracle-report-from-adf-applications.html?goback=%2Egde_4212375_member_102062735
    - http://docs.oracle.com/cd/E29049_01/web.1112/e16182/adf_lifecycle.htm#CIABEJFB
    Thank you!

    The problem was that the HTTP headers were in fact being written twice:
    1. The report server was returning HTTP response headers.
    2. The bean was including its own HTTP response headers (as shown in the question).
    3. The bean was copying the entire contents of the report server response, including the headers, into the output stream.
    Firefox ignored the duplicate header errors, but Google Chrome did not.

  • How to generate PDF using FDF file and the PDF form template (PHP)

    Hi Folks,
    I'm really sorry that I couldn't follow all the valuable discussions going on here, regularly. I need some immediate help.
    I NEED A PHP SOLUTION. I'm able to generate FDF files using the PDF Form Template in PHP. So, I have a collection of FDF files, which seeks the PDF template, while opened and populates the template with FDF data. Now if I need to save this PDF file, I have to do it manually clicking SAVE option. But, I need to convert FDF to PDF in bulk. So, I need some PHP based solution. The PHP script takes the PDF template and the FDF file and merges them to generate a complete populated PDF file. I know it's possible, but don't know how. I've seen Adobe FDF Toolkit. But by default it doesn't show any guideline for PHP. Please help me to write this code. I'm a professional coder. I can understand your hints and tutorials. PLEASE HELP GOOD PEOPLE.

    The only reason I am responding to this post is because the poster sent me a request through the forum message system asking for my help.
    Although I did populate PDFs with FDF data generated by web forms a year or so ago, I have since abandoned that kind of solution. It was a big headache. I found it far more stable and flexible to use html, php and css to populate forms that are almost as nice looking as PDFs.
    So my advice is, if you can possibly avoid going the FDF/PDF route, you will be better off.

  • Generate multiple PDFs using FOP

    Hello,
    please take a look to the following code snipplet it is intended for the generation of a PDF document. The PDF-content is written to an OutputStream which works quite well.
    The problem is that I want to append some more PDF content to the OutpuStream, but these seams to be impossible. Is there anybody who merged several PDF-Streams to one "big OutputStream" ?
    try
    driver.setOutputStream(pdf);
    //Setup XSLT
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer(new StreamSource(xslt));
    //Setup input for XSLT transformation
    Source src = new StreamSource(xml);
    //Resulting SAX events (the generated FO) must be piped through to FOP
    Result res = new SAXResult(driver.getContentHandler());
    //Start XSLT transformation and FOP processing
    transformer.transform(src, res);
    System.out.println("first transformation...");
    finally
    pdf.close();
    }

    Hang on, your thread title suggests you want to generate multiple PDF documents from a single xml source, but the text is talking about combining pdf content.
    I'm not sure which one you really want so I'll the first one.
    I've recently had to generate multiple pdf documents from a single xml source. I used the following (hoping the tags render okay):
                   <xsl:result-document href="{$filename}" format="html">
                        <!-- document root here -->
                        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
                             <xsl:call-template name="masterSet"/>
                             <!-- Apply the ID template to this instance of the ID element -->
                             <xsl:apply-templates select="."/>
                        </fo:root>
                   </xsl:result-document>I used the Saxon engine to split the xml into multiple .fo documents and then ran FOP over each of these.
    The 'xsl:result-document href="{$filename}" format="html"' element does the splitting. Obviously, the filename variable defines the path to the outpute file. You'll no doubt define that within some kind of for-each loop.

  • Problem Generating PDF Using Adobe PDF as Driver

    I am using FM 10, experiencing problems in creating a pdf of a book. I use Adobe PDF as my print driver. The error said that a font,
    HelveticaNeueCond, was not available, and could not be embedded. I had never heard of this font as being in my book, but I downloaded it and installed it on my C drive in my WINDOWS/Fonts folder. Still got the same error!
    Also a pdf was made up to a certain page and then it failed. When I tried pdf ing that failed page, it worked. Then I tried to pdf the pages in between and it failed in a different spot.
    This failure makes no sense.
    I need help!

    There are hundreds of message similar to this one in the archives, so I'd suggest you start reading those, but in general:
    No one can do effective long-distance trouble shooting of your system without all the system details: FM and Acrobat versions, down to the patch levels (do Help > About), your OS, and amount of RAM and free disk space are important also.
    If you are running Windows XP, get the Microsoft Hot fix for all PostScript printers and install if before you do anything else.
    http://support.microsoft.com/?id=952909 (Gives details on the Hotfix)
    http://support.microsoft.com/Hotfix/KBHotfix.aspx?kbnum=952909&kbln=en-us (Direct Download Link)
    Reboot after installing it.
    Then, or start with these if you're not on XP:
    Set the Adobe Acroat printer as your system default printer.
    Be sure you are printing to the Acrobat printer with the Print Command and not using SaveAs PDF
    On the Frame Print dialog box, check Generate Acrobat Data and UNCHECK Print to File.

Maybe you are looking for

  • Unable to open camera raw 6.0 from Bridge CS5

    I just Installed photoshop CS5 and I am unable to view and open my NEF files in Camera Raw from Bridge CS5.  It worked perfectly fine with Bridge CS4 and Camera Raw 5.1.0.30.  Anyone has any suggestion other than using my old Bridge CS4. I have mas O

  • Windows server 2012 essentials errors

    I get 2 errors in an email since I turned on my windows 2012 essentials server that I can not resolve. One is related to my router setup and the other is about the media server. Have not found any solutions to either of these problems and the router

  • How can I sort memos alphabetically?

    I have over 300 memos and want them to be sorted alphabetically. This way, it is easier for me to find a particilar memo or note. How can I set Memo this way?

  • Email one page from a

    How to email a single page of a 20 page PDF  from IPAD

  • About:home search engine not working

    When I attempt searching in about:home it fails. It seems to be a JS error since the html form appears quite valid. My aboutHome.js is here: http://pastebin.com/muSihvGt . As can be seen below, I'm on linux 3.2.0-29-generic , 64 bit. In Aurora.