[jira] [Commented] (FOP-2846) SVG not handled / rendered / embedded properly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (FOP-2846) SVG not handled / rendered / embedded properly

Andreas Joseph Krogh (Jira)

    [ https://issues.apache.org/jira/browse/FOP-2846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16782148#comment-16782148 ]

Jan Tošovský commented on FOP-2846:

I've tried to save SVG into plain PDF in Illustrator (AI) to see what PDF syntax is used. AI creates a clipping mask covering entire 64x64px area. Most likely just to restrict the rendering outside, it has nothing to do with the transparency. Then it sets the graphics state to soft mask with 0.5 opacity and renders the first triangle (fill and then stroke, both with the fulll opacity). After resetting the graphics state it again sets the soft mask to 0.5 opacity and renders the second triangle. So the key here is 'activating' the soft mask before the shape rendering. I am afraid there are no means for this in Batik at the moment. This opacity issue should be IMHO moved to the Batik project.

> SVG not handled / rendered / embedded properly
> ----------------------------------------------
>                 Key: FOP-2846
>                 URL: https://issues.apache.org/jira/browse/FOP-2846
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Björn Kautler
>            Priority: Major
>         Attachments: image-2019-02-21-12-15-39-802.png, image-2019-02-21-12-17-26-206.png, image-2019-02-21-13-35-21-628.png, image-2019-02-21-14-41-29-088.png, image-2019-02-21-14-42-11-550.png, image-2019-02-28-18-00-01-566.png, med-folder-journal.svg, roadsign-attention.svg, svg-border.pdf, svg-no-border.pdf, svg-test.fo, svg-test.pdf, triangles-simplest.pdf, triangles-simplest.svg
> It seems FOP does not handle all SVGs properly.
> The attached [^svg-test.fo] which displays the attached files [^roadsign-attention.svg] and [^med-folder-journal.svg] demonstrate the problem.
> The result of {{fop-2.3/fop/fop svg-test.fo svg-test.pdf}} can be seen in [^svg-test.pdf], especially if you zoom in.
> The {{med-folder-journal.svg}} is properly displayed and scaled, the {{roadsign-attention.svg}} looks like the triangle is rendered to pixels that scale up, but the exclamation mark properly scales.
> Here the PDF content as screenshot on 1200%:
> !image-2019-02-21-12-15-39-802.png!
> Using the code at [https://xmlgraphics.apache.org/batik/using/swing.html] shows that Batik 1.10 can perfectly fine scale up the SVG:
> !image-2019-02-21-12-17-26-206.png!

This message was sent by Atlassian JIRA