xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Schmelter <Ralf.Schmel...@gmx.de>
Subject Re: SVG images are clipped
Date Wed, 03 May 2006 22:16:55 GMT
Hi,

you were right, the viewbox was missing. Setting the source resolution to 
96dpi worked for me. Many thanks!

Best regards,
Ralf


On Wednesday 03 May 2006 08:55, Jeremias Maerki wrote:
> What you can check is if the SVG contains a viewBox. If it does not it
> is most likely your problem. SVGs without a viewbox depend on the
> resolution setting of the viewer to determine the intrinsic size of the
> image. This calls for trouble. FOP defaults to 72dpi. You may need to
> set it to 96dpi: <source-resolution>96</source-resolution> in the config
> file [1].
>
> [1]
> http://xmlgraphics.apache.org/fop/latest/configuration.html#general-element
>s
>
> On 03.05.2006 01:13:15 Ralf Schmelter wrote:
> > Hi,
> >
> > I have a problem embedding SVG images using FOP (version 0.92beta). The
> > images are always clipped at the right and the bottom. The .fo file was
> > created via Docbook (4.2) with the 1.69.1 xsl stylesheets using saxon.
> > The SVG images itself were created using Inkscape V0.43. When I convert
> > the SVG images to PNG using Batik 1.6, everything is fine. If I make the
> > document larger, so that there is free space at the right and bottom, I
> > can get the desired result, but of course this breaks the conversion to
> > PNG.
> >
> > I have attached the output I get for HTML with the SVG converted to PNG
> > via Batik (html-example.png) and the PDF output created with FOP
> > (fo-example.png). Even if I reduce the width to 50%, the SVG is clipped
> > in PDF (but only using half of the page width as expected).
> >
> > Here is the part of the fo-file which embeds the SVG graphic:
> >
> > <fo:block id="d0e181"><fo:external-graphic
> > src="url(pics/gc-overview.svg)" width="auto" height="auto"
> > content-width="auto" content-height="auto"
> > content-type="content-type:image/svg+xml"/></fo:block>
> >
> > Is this a problem of the SVG image or of Docbook (seems unlikely), Batik
> > or FOP?
> >
> > Best regards,
> > Ralf
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message