xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37877] - PDF SVG rendering produces bad dimensions
Date Thu, 15 Dec 2005 19:25:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37877>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37877





------- Additional Comments From jeremias@apache.org  2005-12-15 20:25 -------
(In reply to comment #7)
> (In reply to comment #6)
> > No, no stretching here with FOP Trunk. I'll try again tomorrow with fresh
energy.
> Please try also with <resolution>96</resolution> in FOP config. After that
FOP
> gives me broken PDF at all.. with 72 images are stretched vertically.
> I have no idea maybe AbstractGraphics2D scale causing that or ... no clue ;)
> Tell me what is default resolution anyway if I don't set <resolution> in config
?

I'm not through with this, but at least I have found and fixed a bug in
FOUserAgent that read the resolution value as if it were a pixelToMillimeter
value: http://svn.apache.org/viewcvs?rev=357063&view=rev

The default value for the resolution is 72dpi.

> > If I set the uaResolution to 96 in
> > org.apache.fop.render.pdf.PDFSVGHandler.renderSVGDocument() then the SVG doesn't
> > get clipped. PDF normally uses 72dpi. That and the fact that the SVG doesn't use
> > a viewBox is the reason that the sizes differ. As I learned from Thomas DeWeese,
> > having an SVG without a viewBox asks for trouble. In this case here the viewBox
> > should be: viewBox="0 0 400 350"
> Or even smaller when looking at one set with viewBox="0 0 400 350" the page is
> too big comparing one visible on Inkscape. When I use Batik Squiggle it reports
> viewbox as "0 0 384 336" which is more like one in Inkscape... maybe we can use
> same method as it seems to be more acurate for SVG files without viewBox.
> It is also Inkscape fault coz there is no way to force it to generate viewBox. 

Squiggle, it turns out, uses a user agent that reports 96dpi. That's why the SVG
image looks fine there. The same probably applies to the Adobe SVG Viewer and
the SVG support in Firefox. Only FOP uses 72dpi mostly because of PDF and
PostScript. I'm going to dig a little deeper here. At the very least, I want to
know why the images doesn't look good when I set the resolution to 96dpi.

> Have you been using Inkscape or you do SVG samples by hand ?

I have Inkscape installed and produced a few simple test files with it, but
always manipulating the produced SVG by hand afterwards. I also don't like
Inkscape too much because of the many bugs. I hope that will soon improve. Most
SVGs I create are by hand.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message