[EMAIL PROTECTED] writes:
 > Note on the side: if there's a way to derive the size of the viewBox from 
 > the other attributes and the target 
 > resolution, a possible workaround to avoid the 'manual' intervention may be 
 > to insert the SVG as a 
 > fo:instream-foreign-object, and add the viewBox attribute via XSLT 
 > (combination of: document() + 
 > xsl:copy + xsl:attribute + xsl:copy-of)... Just a suggestion. Should be 
 > doable, IIC.

I don't think it's easy. I've got this hack set up in my code
directly after the call to Batik:

    // Set viewbox. If not set, a default of 100x100 will be assumed by fop
    Element root = svgGenerator.getRoot();
    root.setAttribute("viewBox", "0 0 500 400");

With this in place the resulting FOP output is correct. Without
it the viewBox is fixed to 100x100.

Richard

Reply via email to