This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [docbook-apps] SVG in Docbook XML to PDF gives strange results


Thanks,
That did the trick. I am learning by example and still struggling to get text.svg/text.xml from the docbook-testdocs-1.1 package to work but I guess that lies also in this matter.
I do agree with Tobias Reif fop could behave 'nicer'. Especially when you are learning by example.
Maarten

	-----Original Message----- 
	From: Alexander Karnstedt [mailto:alexander_berlin@gmx.de] 
	Sent: Thu 23/10/2003 16:30 
	To: Sanders, M. 
	Cc: docbook-apps@lists.oasis-open.org 
	Subject: [docbook-apps] SVG in Docbook XML to PDF gives strange results
	
	

	At 13:36 23.10.2003 +0200, Sanders, M. wrote:
	>I am trying to figure out how to include SVG in my docbook XML 4.2 documents.
	>When I use the example from Bob Stayton's XSL book with a file called
	>circle.svg:
	>
	><?xml version="1.0"?>
	><svg xmlns="http://www.w3.org/2000/svg";>
	><g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
	><circle cx="6cm" cy="2cm" r="100" style="fill:red;"
	>transform="translate(0,50)" />
	><circle cx="6cm" cy="2cm" r="100" style="fill:blue;"
	>transform="translate(70,150)" />
	><circle cx="6cm" cy="2cm" r="100" style="fill:green;"
	>transform="translate(-70,150)"/>
	></g>
	></svg>
	>
	>All I get at the location of the image is the upper left quarter of a red
	>oval. I use fop-0.20.5, jimi-1.0.jar en the Java(TM) 2 Runtime
	>Environment, Standard Edition (build 1.4.2_01-b06) by Sun.
	>Anyone got an idea where my problem is?
	
	I think the Âsvg element needs some proper Âwidth and Âheight attributes :
	
	<?xml version="1.0"?>
	<svg xmlns="http://www.w3.org/2000/svg"; width="12cm" height="12cm">
	     <g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
	       <circle cx="6cm" cy="2cm" r="100" style="fill:red;"
	transform="translate(0,50)" />
	       <circle cx="6cm" cy="2cm" r="100" style="fill:blue;"
	transform="translate(70,150)" />
	       <circle cx="6cm" cy="2cm" r="100" style="fill:green;"
	transform="translate(-70,150)"/>
	     </g>
	</svg>
	
	or this way (wich is easier to rescale) :
	
	<?xml version="1.0"?>
	<svg xmlns="http://www.w3.org/2000/svg"; width="6.8cm" height="6.0cm"
	viewBox="-170 -50 340 300">
	     <g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
	       <circle r="100" style="fill:red;" transform="translate(0,50)" />
	       <circle r="100" style="fill:blue;" transform="translate(70,150)" />
	       <circle r="100" style="fill:green;" transform="translate(-70,150)"/>
	     </g>
	</svg>
	
	
	Regards,
	Alex
	
	--
	Alexander Karnstedt
	alexander_berlin@gmx.de
	
	
	
	
	
	
	
	


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]