You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/05/11 16:48:34 UTC

DO NOT REPLY [Bug 39561] New: - SVG squshed in PDF

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

           Summary: SVG squshed in PDF
           Product: Fop
           Version: 0.20.3
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: svg
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: chris.levy@office-shadow.com


Please see original SVG - http://test.office-shadow.com/svg/Original.svg
and result              - http://test.office-shadow.com/svg/After_FOP.pdf

On page 2 of the PDF you can see that the SVG is squshed vertically. It seems 
that this is related to the matrix transformation in the SVG.

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

DO NOT REPLY [Bug 39561] - SVG squshed in PDF

Posted by bu...@apache.org.
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 chris.levy@office-shadow.com  2006-05-11 14:50 -------
Created an attachment (id=18258)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18258&action=view)
Embedded in PDF


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

DO NOT REPLY [Bug 39561] - SVG squshed in PDF

Posted by bu...@apache.org.
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


jeremias@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From jeremias@apache.org  2006-05-12 08:04 -------
Apache FOP displays this SVG the same way that Apache Batik does because FOP
delegates to Batik for SVG handling. I checked the SVG file in Batik's Squiggle
(SVG browser). Adobe's SVG Viewer does not squeeze the image. I don't know why
this happens. You better ask on Batik's user mailing list. Or maybe Thomas
DeWeese sees this issue and has a better idea what the problem is.

I tried to manipulate the SVG to make it display correctly but I didn't manage.
One problem is probably that the SVG uses pixels to define the image 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.

DO NOT REPLY [Bug 39561] - SVG squshed in PDF

Posted by bu...@apache.org.
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 chris.levy@office-shadow.com  2006-05-11 14:50 -------
Created an attachment (id=18257)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18257&action=view)
Original SVG


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

DO NOT REPLY [Bug 39561] - SVG squshed in PDF

Posted by bu...@apache.org.
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.