W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2008

Re: Size of imported SVG Graphics in PDF output

From: <david.vergnaud@finnova.ch>
Date: Wed, 13 Aug 2008 14:07:32 +0200
Message-ID: <696E9A46BED8E544A7BD2C20A7E94F68060E1FFA@marena.SIDON.OLYMP>
To: <www-xsl-fo@w3.org>

Hi

thx a lot for your answer. 

> If you use fo:instream-foreign-object instead, you don't have to encode
> the SVG in base64 and it might also reduce memory consumption just a bit.
> fo:instream-foreign-object has pretty much the same properties as
> fo:external-graphic.
actually i have to use base64-encoded data, because it's originally embedded into another XML file whose schema doesn't allow SVG syntax. but thx for the advice nonetheless.

> It could be that FOP doesn't behave 100% correctly in this case, as the
> SVG itself doesn't really have an intrinsic size. I'll have to look into
> this. But if you want to squeeze the image into the rectangle you
> specify with content-width and content-height, you can set
> scaling="non-uniform".
adding the width and height to the top-level of the SVG file did help, it does work fine now, the area fits to my graphic and i even got the size right :-)
it wasn't actually much of a hassle. 

> That's weird. SVG and PNG should behave the same, at least it does in my
> tests. Are you using the latest FOP version (0.95)?
i take it the size of a PNG image is specified in the file itself, which would explain (as i myself hadn't included them) why i got these different behaviors. so there's actually no problem here with FOP, though i'm still using 0.94 ;-)

again, thx a lot :-)

David
Received on Wednesday, 13 August 2008 12:08:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 13 August 2008 12:08:33 GMT