J.Pietschmann wrote > The content-width and -height properties are not used in FOP 0.20.5. > Use width and heigth instead, if the SVG has been declared to have > the same diomensions, it will fill exactly this space (except for > roundoff and possible off-by-one errors at the edges).
Thanks for your help. Unfortunately when we made the change the result remained the same. (that is the width of the test rectangle remained at 3.6cm rather than 10 cm. We have also simplified the FO code a little, so I have appended our current version. Thanks J Pietschamm for your interest. Any further suggestions would be gratefully appreciated <?xml version="1.0" encoding="utf-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <fo:layout-master-set> <fo:simple-page-master master-name="simple"> <fo:region-body margin="0cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:flow flow-name="xsl-region-body"> <fo:block border-color="black" border-style="solid" border-width="thin"> <fo:instream-foreign-object width='25cm' height='12.5cm'> <svg:svg width='25cm' height='12.5cm' viewbox='0 0 250 125' preserveAspectRatio="xMinYMin meet"> <svg:g id='testGroup' style='stroke:black;fill:none;stroke-width:1'> <svg:rect id='testRect' x='50' y='50' width='100' height='50' style='stroke:black'/> </svg:g> </svg:svg> </fo:instream-foreign-object> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> Regards Paul Pentony TASMIS Project Office Directorate of Training Area Management Corporate Services and Infrastructure Group (02) 6266 3806 (ph) (02) 6266 9999 (fax) CP2-2-174 -----Original Message----- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Saturday, 15 May 2004 4:22 To: Batik Users Subject: Re: sec unclas: Printing SVG to scale using FOP or otherwise. Pentony, Paul wrote: > The approach we have tried is to use FOP to convert the SVG to a PDF. To do > this we embeded the SVG as an inline foreign object in an FO file. We have > tried setting setting the width and height of the SVG element in cm and > setting the content-width and content-height of the insstream-foreign object > to the corresponding values, also in cm. The content-width and -height properties are not used in FOP 0.20.5. Use width and heigth instead, if the SVG has been declared to have the same diomensions, it will fill exactly this space (except for roundoff and possible off-by-one errors at the edges). J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]