Connecting Tech Pros Worldwide Help | Site Map

SVG scale to fit using FOP

Familiar Sight
 
Join Date: Jun 2008
Posts: 164
#1: Oct 23 '08
Hi,

Im having trouble getting my head around how to scale an svg file to best fit a page in pdf using FOP.

The problem is I have a drawing in svg that I want to add to a page in a pdf document. The trouble is the svg image will be different size each time a pdf is created. Does anyone know how I can specify the svg file shrinks or grows for best vuew on page?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,635
#2: Oct 23 '08

re: SVG scale to fit using FOP


Quote:

Originally Posted by cleary1981

The problem is I have a drawing in svg that I want to add to a page in a pdf document. The trouble is the svg image will be different size each time a pdf is created. Does anyone know how I can specify the svg file shrinks or grows for best vuew on page?

can't you use width and height attribute? that would be the most obvious.
Familiar Sight
 
Join Date: Jun 2008
Posts: 164
#3: Oct 24 '08

re: SVG scale to fit using FOP


That would be ok if the svg graphics were always the same size. The problem im facing is that in some cases my graphic could be up to 10 times wider than normal. What I was thinking of is a type of best fit for the page. Is that possible?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,635
#4: Oct 25 '08

re: SVG scale to fit using FOP


(I've not worked with fop or svg, yet)

how do you define "best fit for the page"? maybe you can use xsl to determine that for you.....

regards
Reply