Fop
  1. Fop
  2. FOP-1259

[PATCH] Invalid PDF for certain numerical values in SVG lineargradient

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: renderer/svg
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: All
    • External issue ID:
      40699

      Description

      I use fop built from a recent source snapshot, as the svn access fails for me.
      The specific version I use is fop_trunk_20061004042355.
      I have a small svg file with only one path using a lineargradient, which
      for certain numerical values generates pdf which make acroat complain:
      "Ein nicht erkannter token "1.999999137575E-05" wurde gefunden"
      (this is german locale for "An unknown token ... was found").
      The exact numerial value of thi error message varies when certain
      coordinates in the path are modified.

      The path is a simple triangle, the x-coordinate of the first/last point
      is 0.0001; There is no error when I change this to 0.001.
      The opacity of the first stop in the linear gradient is 0.9; There is no
      error when I change this to 1.

      1. test.pdf
        162 kB
        Luis Bernardo
      2. test.fo
        0.5 kB
        Luis Bernardo
      3. fop.patch
        0.8 kB
        Luis Bernardo
      4. fop_problem.svg
        0.6 kB
        Michael Bartmann

        Activity

        Hide
        Michael Bartmann added a comment -

        Attachment fop_problem.svg has been added with description: SVG file causing the prolem when used with docbook/fop

        Show
        Michael Bartmann added a comment - Attachment fop_problem.svg has been added with description: SVG file causing the prolem when used with docbook/fop
        Hide
        Michael Bartmann added a comment -

        I must admid, that I am not able to determine whether this might also
        be a bug in acrobat reader 7. There is no waterproof evidence that the problem
        is in fop. But then again...

        Show
        Michael Bartmann added a comment - I must admid, that I am not able to determine whether this might also be a bug in acrobat reader 7. There is no waterproof evidence that the problem is in fop. But then again...
        Hide
        Luis Bernardo added a comment -

        The issue was being caused by small decimal numbers that were being output in scientific notation (which is is not valid in PDF). The patch addresses and fixes this particular issue.

        Show
        Luis Bernardo added a comment - The issue was being caused by small decimal numbers that were being output in scientific notation (which is is not valid in PDF). The patch addresses and fixes this particular issue.
        Hide
        Luis Bernardo added a comment -

        Attachment fop.patch has been added with description: patch that fixes issue

        Show
        Luis Bernardo added a comment - Attachment fop.patch has been added with description: patch that fixes issue
        Hide
        Luis Bernardo added a comment -

        Attachment test.pdf has been added with description: output PDF of test case after fix

        Show
        Luis Bernardo added a comment - Attachment test.pdf has been added with description: output PDF of test case after fix
        Hide
        Luis Bernardo added a comment -

        Attachment test.fo has been added with description: test FO file that uses given SVG file

        Show
        Luis Bernardo added a comment - Attachment test.fo has been added with description: test FO file that uses given SVG file
        Hide
        Glenn Adams added a comment -

        patch applied at http://svn.apache.org/viewvc?rev=1338967&view=rev

        thanks luis and michael!

        please review and close if satisfied

        Show
        Glenn Adams added a comment - patch applied at http://svn.apache.org/viewvc?rev=1338967&view=rev thanks luis and michael! please review and close if satisfied

          People

          • Assignee:
            fop-dev
            Reporter:
            Michael Bartmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development