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

Andreas L. Delmelle commented on FOP-2549:
------------------------------------------

Back on topic for this particular issue: the confusion stems -- I think -- from 
the fact that the gradient in the SVG has two stops with the same offset (= 1). 
Somehow -- vague as I am not quite there yet -- this triggers the generation of 
a stitching function where with 3 functions where one would expect 2. Very 
likely, that is what throws off the eventual rendering of the PDF in Acrobat 
Reader. If you comment out or remove the unnecessary second stops in the SVG, 
the sample renders as intended.

Now, I still think this is a bug, but solving it by just adding the extra value 
in the Bounds array would not be appropriate. We just need to fix the code so 
that this case of two stops with the same offset does not trigger the 
generation an extra subfunction (which then makes the Functions array one 
element too long).

> [PATCH] SVGs with radial gradiant causes PDF display error
> ----------------------------------------------------------
>
>                 Key: FOP-2549
>                 URL: https://issues.apache.org/jira/browse/FOP-2549
>             Project: FOP
>          Issue Type: Bug
>          Components: image/svg
>            Reporter: Matthias Reischenbacher
>         Attachments: fop-2549-test-case.pdf, fop-2549-test-case.svg, 
> fop-2549-test-case_wrong.pdf, fop-2549.patch
>
>
> A radial gradiant isn't processed correctly by FOP. E.g. the following 
> gradiant:
> <radialGradient
>    cx="51159.898"
>    cy="57300"
>    r="5279.6602"
>    fx="51159.898"
>    fy="57300"
>    id="id0"
>    gradientUnits="userSpaceOnUse">
>    <stop
>    id="stop28"
>    style="stop-color:#fefefe;stop-opacity:1"
>    offset="0" />
>    <stop
>    id="stop30"
>    style="stop-color:#cdcece;stop-opacity:1"
>    offset="0.58823502" />
>    <stop
>    id="stop32"
>    style="stop-color:#9d9e9e;stop-opacity:1"
>    offset="1" />
>    <stop
>    id="stop34"
>    style="stop-color:#9d9e9e;stop-opacity:1"
>    offset="1" />
>   </radialGradient>
> is only outputted with one "Bound" entry in the PDF color function (instead 
> of two).
> When opening the PDF with Adobe Acrobat the SVG is only partially displayed 
> and an error message pops up after clicking on the image.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to