Inconsistent FOP behavior ?

Discussion in 'XML' started by Andrew Tyson, Jan 6, 2004.

  1. Andrew Tyson

    Andrew Tyson Guest

    Hi,

    I am pulling my hair out trying to figure out a problem that I am having
    using FOP to generate PDFs that have embedded SVG graphics.

    The base 64 encoded SVG is embedded as an attribute within a source XML
    document

    <?xml version="1.0" encoding="UTF-8"?>
    <ReportCashAcctStmt portfolioCode="FIXED_1" portfolioRptName="Fixed Interest
    testing#1" brandingImage="&lt;svg:image width=&quot;588&quot;
    height=&quot;118&quot; xlink:href=&quot;data:image/jpeg;base64,/9j/4AAQSkZJ
    ...... &quot; transform=&quot;matrix(1 0 0 1 0 0)&quot;/&gt;">


    An XSL-T is used to generate the XSL-FO, and the SVG is embedded thus;

    <fo:instream-foreign-object width="3cm" height="1cm"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:svg="http://www.w3.org/2000/svg">
    <svg:svg width="3cm" height="1cm" viewBox="0 0 118 558"
    xml:space="preserve" >
    <svg:g><xsl:value-of select="@brandingImage"
    disable-output-escaping="yes"/></svg:g></svg:svg>
    </fo:instream-foreign-object>

    Now when I run this through Xalan command line I generate the correct XSL-FO
    (including the embedded image) that can be fed to FOP directly and creates a
    PDF, for example .

    $ java org.apache.xalan.xslt.Process -IN Untitled8.xml -XSL
    reportClientPackFO.xsl -OUT Untitled8.fo
    $ java org.apache.fop.apps.Fop -fo Untitled8.fo -pdf ~/Untitled8.pdf

    This works fine, however if I use FOP directly to generate the PDF using the
    stylesheet and source XML the image is missing !

    $ java org.apache.fop.apps.Fop -xsl reportClientPackFO.xsl -xml
    Untitled8.xml -pdf ~/Untitled8.pdf

    does not work (i.e. the image does not get embedded in the resulting PDF)
    !!!

    I have tried various different versions of FOP/Xerces/Xalan/Batik to no
    avail, and I would really appreciate any advice anyone might have.

    Thanks and regards,
    Andrew
     
    Andrew Tyson, Jan 6, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q3phciBFY2xhcmluYWw=?=

    DataSet inconsistent in behavior in different session state manage

    =?Utf-8?B?Q3phciBFY2xhcmluYWw=?=, Aug 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    452
    =?Utf-8?B?Q3phciBFY2xhcmluYWw=?=
    Aug 30, 2005
  2. Mossman
    Replies:
    1
    Views:
    563
    cbDevelopment
    Dec 12, 2005
  3. Mossman
    Replies:
    0
    Views:
    847
    Mossman
    Dec 12, 2005
  4. Denis S. Otkidach

    Inconsistent behavior of descriptors

    Denis S. Otkidach, Sep 30, 2003, in forum: Python
    Replies:
    2
    Views:
    365
    Bengt Richter
    Oct 1, 2003
  5. Pablo
    Replies:
    0
    Views:
    1,013
    Pablo
    Mar 28, 2007
Loading...

Share This Page