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

I used FOP-0.20.1 with Batik-1.1rc1.

-Steve Maring

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010719//EN" 
<svg width="12cm" height="4cm" viewBox="0 0 1200 400">
	<desc>Example circle01 - circle filled with red and stroked with

	<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"  />

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

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

View raw message