xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan wood <jonathanshaww...@gmail.com>
Subject Re: OK to rescale SVG in PDF by changing just width and height values?
Date Tue, 20 Jul 2010 16:15:55 GMT
You might also keep the preserveAspectRatio attribute in mind if a viewBox
is present, although the xMidYMid default is exactly what you describe in
your use case...

http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute


On Tue, Jul 20, 2010 at 11:19 AM, Joe Pairman <joeyp2008@gmail.com> wrote:

> I'm including SVG graphics in PDF user guides. I need to control the
> displayed size programmatically, effectively scaling the SVG including
> all its content. The best result I've had so far is by changing only
> the values of the width and height attributes, leaving everything else
> untouched, and not even changing the viewBox. This would seem to fit
> with Martin Jacobson's description here:
>
> http://old.nabble.com/Affine-Transforms-on-JSVGCanvas-Objects-to25206324.html#a25209903
> "The physical (ie display/print) dimensions are given by the "width"
> and "height"  attributes, while
> the drawing dimensions are described by the "viewPort" attribute."
>
> Is there anything I should beware of when using this approach to
> resize/rescale SVG? Anything I'm missing?
>
> Thanks for any tips.
> Joe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>

Mime
View raw message