xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Pairman <joeyp2...@gmail.com>
Subject Re: OK to rescale SVG in PDF by changing just width and height values?
Date Wed, 21 Jul 2010 07:20:49 GMT
Thanks for the tip, Jonathan. I tried a couple of test cases and it
seems the default is fine for that.

I have a follow-up question. Is it possible to use Batik via the
Windows command line to change the width and height values by a
certain percentage? I read that the transcoder could change these
values, but all the information I can find so far concerns the
transcoder API; not anything directly accessible via the command line.

I know I could use other XML tools to do this, but I'm using the Batik
rasterizer already and would rather use Batik for all SVG conversions.

Thanks,
Joe

On Wed, Jul 21, 2010 at 12:15 AM, jonathan wood
<jonathanshawwood@gmail.com> wrote:
>
> 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