Hi
I posted this to the users mail list with no success; I'm hoping someone can here can point me in the right direction...? In the archives I've seen some dev discussions of which Batik to use when rendering embeded SVG in FO and which to use when rendering SVG to PNG/JPEG (but I need to do both...)


I've got a weird problem generating pdfs using FOP from xml containing SVG; but only when processed through Cocoon (2.1.2). Generation directly with FOP is problem free.

For viewBox values larger than "0 0 525 525" (you know this is going to be weird already...) the generated image within the PDF is proportionally smaller than specified in the svg element's width/height attributes.

For example this renders as a black square filled in red and is 7 in on each side:

<fo:block text-align="center">
<fo:instream-foreign-object text-align="center">
<svg:svg xmlns:xlink="http://www.w3.org/1999/xlink"; height="7in" width="7in" viewBox="0 0 500, 500">
<svg:rect x="0px" y="0px" width="500" height="500" style="stroke-width:1;stroke:black;fill:red"/>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>


But this renders as a black edged square filled in red and is ~6 in on each side:
<fo:block text-align="center">
<fo:instream-foreign-object text-align="center">
<svg:svg xmlns:xlink="http://www.w3.org/1999/xlink"; height="7in" width="7in" viewBox="0 0 600, 600">
<!-- rect sized to completely fill viewBox -->
<svg:rect x="0px" y="0px" width="600" height="600" style="stroke-width:1;stroke:black;fill:red"/>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>


Of course the data I'm rendering is in a scale requiring viewBox sizes well over 1000 in width/height.

Has anyone got a pointer for me? I took a look at FOPSerializer and it doesn't really do anything suspicious...
Thanks
Steve


_________________________________________________________________
Click, drag and drop. My MSN is the simple way to design your homepage. http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/


Reply via email to