xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maring, Steve" <Steve_Mar...@tvratings.com>
Subject confused about SVG size when converted to PDF
Date Fri, 17 Aug 2001 17:39:10 GMT
Looking at the following svg with the SVG Browser from Batik 1.1rc1 I get
the proper 12cm wide display with a circle in the middle that I expect.
When I try to diplay the svg as a PDF document using the XSL-FO below, I get
what looks like the viewBox dimensions calculated against 72dpi.  (i.e. a
1200/72 = 16.67in instead of 12cm wide)  Looking through the code it looked
like FOP was using the Transcoder API to rasterize the image, but the
quality of the circle edges on the resulting PDF is certainly much better
than a raster image at 72dpi!

Can somebody PLEASE explain to me what is going on?  I'd like to diplay an
svg like this at the stated width (12cm) in pdf with a 600dpi resolution
quality.

I used FOP-0.20.1 with Batik-1.1rc1.

Thanks.
-Steve Maring


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010719//EN" 
	"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
<svg width="12cm" height="4cm" viewBox="0 0 1200 400">
	<desc>Example circle01 - circle filled with red and stroked with
blue</desc>

	<rect x="1" y="1" width="1198" height="398"
		fill="none" stroke="blue" stroke-width="2"/>

	<circle cx="600" cy="200" r="100"
		fill="red" stroke="blue" stroke-width="10"  />
</svg>



<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<fo:layout-master-set>
		<fo:simple-page-master		master-name="mymaster"
			page-height="11in"		page-width="8.5in">
			<fo:region-body/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-name="mymaster">
		<fo:flow flow-name="xsl-region-body">
			<fo:block>
				<fo:external-graphic src="file:circle.svg"/>
			</fo:block>
		</fo:flow>
	</fo:page-sequence>
</fo:root>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message