Hi guys,

I have ran into a dead end trying to generate a PDF report which should contain SVG files generated on the fly, and I was hoping that I can find some help here on how to proceed next. At first, I embedded a svg file into a fo file using the fo:instream-foreign-object and everything worked as expected, generating the PDF report that I needed from the fo file by following the examples from the FO website. But then the pdf report that I have to generate uses as source data a java object which contains a string property which provides the svg file and looking at the example from the FOP website http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java I created an xslt file like this:

<xsl:template match="reportEntry">
<fo:block>

<fo:block>
<xsl:value-of select="title"/>
</fo:block>

<fo:block>
<xsl:value-of select="description"/>
</fo:block>

<fo:instream-foreign-object>
<xsl:value-of select="svg"/>
</fo:instream-foreign-object>

</fo:block>
</xsl:template>

But now, when I run the code I get the following exception:

javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Error(Unknown location): fo:instream-foreign-object is missing child elements.
Required Content Model: one (1) non-XSL namespace child

I have tried to find any help with google on how I can approach this, but the only resources that I found use static resources as I did in the first scenario, which is not enough for my use case. Can you point me into the right direction on how to approach this?

Thanks for your help,
Cristi

--
Cristian-Andrei Cioriia
Programator Java

1&1 Internet Development S.R.L. - Bucharest/Romania - Web Applications Hosting 
Romania
18 Mircea Eliade St
Sect 1, Bucharest
RO Bucharest, 012015
Num&#259;r de telefon: +40 751 812 984
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to