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 39561] - SVG squshed in PDF
Date Fri, 12 May 2006 20:46:05 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=39561>.
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=39561





------- Additional Comments From deweese@apache.org  2006-05-12 20:46 -------
(In reply to comment #3)
> Apache FOP displays this SVG the same way that Apache Batik does because FOP
> delegates to Batik for SVG handling. 

   FOP/Batik displays the SVG correctly.

> Adobe's SVG Viewer does not squeeze the image. I don't know why
> this happens. 

   Because Adobe's SVG viewer doesn't implement preserveAspectRatio
on the image element, worse their non-implementation (none) is not the
default value for preserveAspectRatio (xMidYMid meet).

   What is happening is that you have specified that the image should
be fit to a 1x1 box, however the aspect ratio of the image doesn't
match 1x1, so preserveAspectRatio kicks in to match the two.  The default
value centers the content so that it touches the edge of the given area in
one dimension and leave blank space at the top and bottom.

   You then streatch the 1x1 box to the 'proper' aspect ratio but
since Batik correctly avoided distorting the image when fitting it
to the 1x1 box your scaling transform now squishes it (in Adobe it
'undoes' the horizontal squish used to fit the image to the 1x1 box).

   The short answer of what to do is add:
      preserveAspectRatio="none"
   to your image element,  you might also think about just sizing
the image element correctly since you obviously know the desired size...


-- 
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