SVG scale to fit using FOP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cleary1981
    New Member
    • Jun 2008
    • 178

    SVG scale to fit using FOP

    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
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    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.

    Comment

    • cleary1981
      New Member
      • Jun 2008
      • 178

      #3
      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?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        (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

        Comment

        Working...