Reports using xsl:fo - include external pdf

Not strictly an Apex question, but posted here as the application is in Apex.
I have a report layout defined in xsl:fo in my application. As part of this report, I also need to pick up an external pdf file (scanned document) and print with the report. I have added the external document to my fo definition as follows:
<fo:page-sequence master-reference="portraitblank">
<fo:flow flow-name="region-body">
     <fo:block>
          <fox:external-document content-type="pdf" src="url('http://myhostaddress:8088/filepath/docname.pdf')" />
     </fo:block>
</fo:flow>
</fo:page-sequence>
(Obviously the url of the file is not as shown above, this is just for example purposes)
If I do not have the above, my report generates 100%. When I include the external pdf, however, the report fails with a "File does not begin with '%PDF-'" error. I have opened the external pdf with Notepad, and it does start with '%PDF-'
Any suggestions?

After much browbeating and head scratching, I now know where the problem is - but not yet how to fix it. The apex_fop supplied with apex does not contain the java packages which enable the use of xsl:fox extensions. Either a new fop distribution, with servlet, must be created, or the apex_fop distribution must be updated to include the necessary java packages.
Edited by: Andre Olivier on May 9, 2013 4:02 AM

Similar Messages

  • Image not displaying in pdf report using XSL-FO and using Oracle 11g databa

    Good Afternoon,
    I have created over 15 reports using XSL-fo, with the following syntax to display an image on the pdf:
    fo:block margin-left="0.24cm" margin-right="0.27cm" margin-top="0.0cm" ><fo:external-graphic content-width="scale-to-fit" content-height="scale-to-fit" width="1.73cm" height="1.57cm" >
    <xsl:attribute name="src">'url("http://readiness:7780/i/marforcom_symbol_rpts.gif")'</xsl:attribute></fo:external-graphic>
    </fo:block>
    This syntax works fine when using Oracle 10g, now my database has been upgraded to 11g and my image no longer displays in the reports. I have already upload the image into the database as a workspace image.
    I have tried to point the image @ the image by using url(#WORKSPACE_IMAGE#marforcom_symbol_rpts.gif)
    or <img src ="#IMAGE_PREFIX#marforcom_symbol_rpts.gif")
    and it still doesn't work.
    I have searched this forum trying to come up with a solution that will fix my problem and am unable to.
    Current config: Oracle 11g, using pl/sql gateway.
    I need to know how to point the xsl-fo file to the database, where the image now resides.
    Thanks,
    Mary
    Edited by: MaryM on Jul 25, 2012 3:15 PM
    Edited by: MaryM on Jul 25, 2012 3:51 PM

    Hi,
    I think you need load images to database XDB virtual directory /i/ and then use #IMAGE_PREFIX# substitution.
    This might help to access /i/
    http://www.apex-blog.com/oracle-apex/accessing-i-using-ftp-170.html
    Or use this to load images
    http://oracleinsights.blogspot.fi/2012/05/loading-images-into-oracle-xdb.html
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Creating multipage report using XSL

    Hi
    Here is one requirement in our project, where we have multiple purchase order in XML file, each of the purchase order may contains n number of lines. We have to create the PO report using the XSL-FO method.
    If any purchase order printed on n no. of pages then page from 1 to (n-1) should display only subtotal and n th(the last page for respective purchase order) page should display the total of all the line involved in the respective purchase order.
    I want to ask :
    how it can be done?
    Is it possible using XSL-FO or XSLT?

    Apache FOP may be used to create PDF reports from an XML file.
    http://www.packtpub.com/article/converting-xml-to-pdf

  • Problem using Jar to include external jars in an application

    Ok so, I've just completed a project, and i want to be able to jar it up so its executable by just using the jar file. I can do this, and it will load the first screen. However, i used eclipse to develop it so I just added two files to the eclipse path and it all worked. But when I jar up my application (and include the two external jars in my app), and try to use any class that needs the external jar, it dies and says java.lang.NoClassDefinitionError: javax/servlet/http/HttpServlet
    How do i set it up so it actually finds the classes in the external jar?? Its fairly important that i get this to work :)

    If this app is not running as part of Tomcat, you have two options. One, as ejp pointed out, is to put the missing jars into your $JAVA_HOME/lib/ext dir. If you've already tried that and it's not working, then the jars your putting there do not have the necessary classes in them. Use 'jar -tf <jarname>' to see a list of the classes in the jar.
    The second approach, which it sounds like you've already tried, is using the Class-Path entry in the Manifest file. You must make sure that the jar you're referencing (servlet.jar) has the missing classes in it, and that the jar is in the same directory as the application jar. Another potential gotcha with this approach is to make sure that the jar is not indexed (they're not indexed by default).

  • Problem when using inlineFrame to include external web page.

    I built a ADF web application which include some external web pages.
    I use the ADF components: panelTabbed + showDetailItem + inlineFrame.
    Each tab is point to a external web page. see my code belows:
    <af:panelTabbed id="pt1">
    <af:showDetailItem text="showDetailItem 1" id="sdi1"
    disclosureListener="#{myBackingBean.disclosureListener}">
    <af:inlineFrame source="http://www.baidu.com" id="ilf1" shortDesc="4444444444"/>
    </af:showDetailItem>
    <af:showDetailItem text="showDetailItem 2" id="sdi2">
    <af:inlineFrame id="if1" source="query_refresh_by_poll_2.jsf"/>
    </af:showDetailItem>
    <af:showDetailItem text="showDetailItem 3" id="sdi3">
    <af:inputText label="Label 1" id="it1"/>
    </af:showDetailItem>
    <af:showDetailItem text="showDetailItem 3" id="sdi4">
    <af:inlineFrame id="if2" source="untitled2.jsf"/>
    </af:showDetailItem>
    </af:panelTabbed>
    It almost done except one thing: When I switched the tab back and forth, the input parameter in the previous tab will be lost.
    It seems af:inlineFrame always reload the page and clear every input by user !
    How to preserve the user input when switched the tab back and forth?
    Thanks.

    Hi Frank, thanks for you reply.
    Let me explain my case again to make sure you know what I want to do.
    because I do think it is a usual requirment, I want you give me a clear answer about it.
    In my ADF web App, I have 3 pages: main.jsf,untitled1.jsf,untitled2.jsf
    main.jsf content:
    <af:form id="f1">
    <af:panelTabbed id="pt1">
    <af:showDetailItem text="showDetailItem 1" id="sdi1">
    <af:inlineFrame id="if1" source="untitled1.jsf"/>
    </af:showDetailItem>
    <af:showDetailItem text="showDetailItem 2" id="sdi2">
    <af:inlineFrame id="if2" source="untitled2.jsf"/>
    </af:showDetailItem>
    </af:panelTabbed>
    </af:form>
    untitled1.jsf content:
    <af:inputText label="Label 1" id="it1"/>
    untitled2.jsf content:
    <af:inputText label="Label 1" id="it1"/>
    Run main.jsf, in tab1, fill someting in the inputText, then click tab2, then click tab1 back, the input text that I just entered was cleared.
    I want to keep the user input when switch between the tabs.
    Is it possible in ADF?

  • Using XSL-FO for Interactive Report PDF printout

    I am using XSL-FO, Apache FOP and use FO Designer to produce a PDF from SQL Based Report (not IR). This is working fine.
    How can use the same concept for Interactive Report. I can not see how to make IR to use XSL-FO and Apache FOP.
    It looks that IR is only working for BI Publisher. Am I right?

    Interactive Reports currently only support the built-in default XSL-FO layout, i.e. there are only limited customization options available. Report Queries (see Shared Components) and Classic Reports can either use the default XSL-FO Layout, or can be associated with RTF or XSL-FO based templates. We plan to extend printing support for Interactive Reports in a future version of Oracle Application Express to provide similar features as is currently available for Report Queries and Classic Reports.
    Regards,
    Marc

  • Report Layouts: FO : Include external graphics

    I am trying to create a PDF report using apache FO. The report needs to include a gif logo file
    I have tried using the following tags
    <fo:external-graphic>
    <xsl:attribute name="src">file://image.gif</xsl:attribute>
    </fo:external-graphic>
    Where should the image reside
    Is it possible to reference the /i/ directory or #APP_IMAGES# or #WORKSPACE_IMAGES#

    After much browbeating and head scratching, I now know where the problem is - but not yet how to fix it. The apex_fop supplied with apex does not contain the java packages which enable the use of xsl:fox extensions. Either a new fop distribution, with servlet, must be created, or the apex_fop distribution must be updated to include the necessary java packages.
    Edited by: Andre Olivier on May 9, 2013 4:02 AM

  • Using Business area for External Reporting-Pros & Cons?

    Dear Freinds,
    We are a Retail Business Group half way through SAP IS Retail implementation. We have 8 legal entities, currently their complete Annual Financials are being made & audited separately. In SAP the structure is that there is Single Co. Code & transactions will be seggregated by Business Area (made manadatory for data entry) and Annual Accounts will be drawn up using Business Area.
    This to me does not seem to be the right structure. I have joined the group recently, I will be much thankful to you all if you please help me list the Pros & Cons of using Business Area for external reporting.
    Rajesh Agarwal
    [email protected]
    Edited by: Rajesh Agarwal on Jan 27, 2008 6:54 PM

    Dan: <i>For management reporting you may not want to post eliminations between companies where the business areas are the same.</i>
    If the Business wants to see the eliminations between companies, within the same business area, as part of BEx reports, what should I do? They do not want to execute consolidation functions in UCMON but just want to see how the eliminations have taken place between companies with in the same business area. 
    Dan: <i>As long as the partner company and partner business area are consistently included for the intercompany transactions, the eliminations between Legal and Management will agree at the top-level of each hierarchy.</i>
    Have I to introduce one more InfoObject Partner Business Area in the data basis and assign the role Sub-assignment once again?
    Thanks in advance.

  • I have OSX Maverick on an iMac using Outlook e-mail.  PDF attachments are included in the e-mail  as the whole document rather than just the PDF icon.  How can i have just the PDF icon as an attachment?

    In Outlook my PDF attachments appear as whole documents and not just the PDF icon.  How can I have attachments included as PDF icons and not the documents?

    For your own viewing, you can of course control-click on the attachment and select "View as Icon".
    For others' viewing, it depends upon their email reader.  To ensure that attachments are not displayed expicitly you can put them all in a zip file (via control click and "Compress") then attaching them, or you can use third party stuff like Attachment Tamer.
    charlie

  • Urgent: Issue while displaying the PDF Reports Using XDO Common region

    Hi all,
    In our product code we are trying to display the PDF Reports, using the xdo common region.
    Previously we were writing the pdf reports direclty onto the response direclty.
    This displays the report onto the browser but if navigate throw browser back button, it doesn't displays the report as the response stream is empty while navigating through back button.
    So to solve this issue, i tried to write the report using the OAHTMLWebBean and xdo common region. Here is the code:
    ByteArrayOutputStream xdoOutput = new ByteArrayOutputStream();
    XDOUtility.retrieveReport(xdoOutput,
    parameters,
    prop,
    appMod
    BlobDomain bxdoOutput = new BlobDomain();
    bxdoOutput.setBytes(xdoOutput.toByteArray());
    String redirectURL = DocumentHelper.getOutputURL(pageContext,
    bxdoOutput,
    "Report",
    "PDF");
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean (pageContext, OAWebBeanConstants.HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src", redirectURL);
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "100%");
    outRegion.setHTMLAttributeValue("title","Report");
    outRegion.setHTMLAttributeValue("name","Report");
    pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    This successfully displays the report in the XDO Common region. But now the issue is that there are hyperlinks in the Report displayed where from where the user can navigate to other detail pages.
    When we click on these links, a new session starts in the xdo common region.
    Is it possible that when the user click the links in the report displayed, instead of starting a new session in the xdo region, the detail pages is displayed with in the older session.
    Regards
    Sandeep

    Hi all,
    In our product code we are trying to display the PDF Reports, using the xdo common region.
    Previously we were writing the pdf reports direclty onto the response direclty.
    This displays the report onto the browser but if navigate throw browser back button, it doesn't displays the report as the response stream is empty while navigating through back button.
    So to solve this issue, i tried to write the report using the OAHTMLWebBean and xdo common region. Here is the code:
    ByteArrayOutputStream xdoOutput = new ByteArrayOutputStream();
    XDOUtility.retrieveReport(xdoOutput,
    parameters,
    prop,
    appMod
    BlobDomain bxdoOutput = new BlobDomain();
    bxdoOutput.setBytes(xdoOutput.toByteArray());
    String redirectURL = DocumentHelper.getOutputURL(pageContext,
    bxdoOutput,
    "Report",
    "PDF");
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean (pageContext, OAWebBeanConstants.HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src", redirectURL);
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "100%");
    outRegion.setHTMLAttributeValue("title","Report");
    outRegion.setHTMLAttributeValue("name","Report");
    pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    This successfully displays the report in the XDO Common region. But now the issue is that there are hyperlinks in the Report displayed where from where the user can navigate to other detail pages.
    When we click on these links, a new session starts in the xdo common region.
    Is it possible that when the user click the links in the report displayed, instead of starting a new session in the xdo region, the detail pages is displayed with in the older session.
    Regards
    Sandeep

  • How to generate PDF file through reports using forms 6i

    Hi all,
    I am using oracle 10g with forms 6i and reports 6i.I need to generate pdf file where clicking a button a report should be called and the report should be generated as a .pdf file in the source i have specified(ex. d:\...).Is this popssible with forms?.how can i achieve this.Kindly help me with suitable answers.Thanks :)
    Regards
    Vids

    hi,
    regarding report, there is a dedicated report forum. you should post there.
    but answer for your question is form is nothing to do with the pdf generation. you can call the report from the as usual.
    In the report you should set the properties like
    destype to 'file'
    desname to 'path with file name'
    desformat to 'pdf'

  • HT201250 Can I include external drives to be backed up using Time Machine.  Not only do I want to back up my IMac, but I have several extenal drives for one iPhoto, one iTunes and one for other files & documents.

    Can I include external drives to be backed up using Time Machine?  Not only do I want to back up my IMac, but I have several extenal drives for one iPhoto, one iTunes and one for other files & documents.  How do I know if they are included in the backup process?

    Yes, if they are not exclude then TM backs them up.
    Allan

  • How to generate a PDF report using ADF RichTable?

    Hi,
    I am using JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I am displaying my data from db in a JSF Fragment(JSFF) using ADF RichTable component. Actually now I want to generate a PDF report using that data shown in the table on click of a Generate Button. Can anyone please provide me code or sample for that?
    Thanks,
    Vikas

    http://kohlivikram.blogspot.com/2009/04/generate-pdf-report-in-adf.html
    Thanks,
    Navaneeth

  • How to include external .js file into .ear file using NetBean 5.5.1?

    is it possible to include external .js file into .ear file using NetBean 5.5.1? if not, then where should I placed the external .js file and how to write the src="xxx" element? (that is , how to write the path of "xxx"?)
    I am using JBOSS 4.2.2 GA as server
    thx!!

    Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?

  • Problems faced when using xsl:include and extension functions

    I am Working in XML and XSLT using Oracle's XML Parser V2.
    Previously i had worked in Microsoft technology using MSXMLParser.
    I am facing some problems in XSLT. They are as below...
    1. Using <xsl-include href="Somexsl.xsl">
    the oraclexmlparser processor is giving the error : XSL-1002: Error while processing include XSL file (no protocol: Submenu.xsl).
    * Can u tell me why i am getting this error, and what is the fix for this.
    The same case with <xsl:import> too.
    2. In case i have to write some functions in the previous WD of xsl i used these statements
    <?xml version='1.0'?>
    <!DOCTYPE PageRoot SYSTEM "../../Common/dtd/PageNavBar.dtd">
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/TR/WD-xsl"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    result-ns="">
    <xsl:script xmlns:xsl="uri:xsl"><![CDATA[
    var strWebContentPath = "/SurSITE/Content/";
    var strWebImagePath = "/SurSITE/sursitegraphics/";
    function IncScript()
    return "<script language='javascript' src='/SurSITE/Includes/avalidations.js'></script>";
    ]]>
    </xsl:script>
    To call the function i used this
    <xsl:eval no-entities='true'> IncScript();</xsl:eval>
    * Can u tell me how do i do this now, i tried with the code above using the current name space (<xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />)
    Please use the example given above.
    I will be very greatfull to u if u can give me some suggestion or help for the above said problems.
    Thanking you and eagerly waiting for your reply(s).
    null

    The current version is "1.0" not "1.1"
    You haven't included the code for what your <xsl:include>
    statement looks like, which seems to be what it's complaining
    about...
    XSLT 1.0 has no <xsl:eval>, this is a microsoft specific tag
    from a pre-XSLT-1.0 version.
    XSLT 1.0 has no <xsl:script> element either.

Maybe you are looking for