Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2283

Incorrect transform for annotations / appearance streams

Details

    Description

      The attached file (from the ghostscript installation) doesn't render properly, especially page 3, where the images are about double the size. The cause is that the transform for the appearance stream must be calculated based on the BBox and the appearance rectangle and the matrix (if available). This is described in "Algorithm: Appearance streams" in the "Appearance Streams" section of the spec.

      I have already prepared a fix, which I will commit after PDFBOX-2262.

      Update: this issue is also about signatures and acroform fields, because these have also appearance streams that are rendered with the same code.

      Attachments

        1. annots.pdf
          384 kB
          Tilman Hausherr
        2. annots.pdf-3-bad.png
          33 kB
          Tilman Hausherr
        3. annots.pdf-3-good.png
          30 kB
          Tilman Hausherr
        4. annots.pdf-4-bad.png
          32 kB
          Tilman Hausherr
        5. annots.pdf-4-good.png
          32 kB
          Tilman Hausherr
        6. annots.pdf-5-bad.png
          53 kB
          Tilman Hausherr
        7. annots.pdf-5-good.png
          45 kB
          Tilman Hausherr

        Issue Links

          Activity

            Commit 1621465 from tilman in branch 'pdfbox/trunk'
            [ https://svn.apache.org/r1621465 ]

            PDFBOX-2283: fix comments

            jira-bot ASF subversion and git services added a comment - Commit 1621465 from tilman in branch 'pdfbox/trunk' [ https://svn.apache.org/r1621465 ] PDFBOX-2283 : fix comments

            Commit 1621462 from tilman in branch 'pdfbox/trunk'
            [ https://svn.apache.org/r1621462 ]

            PDFBOX-2283: correct transform / clipping for appearance streams

            jira-bot ASF subversion and git services added a comment - Commit 1621462 from tilman in branch 'pdfbox/trunk' [ https://svn.apache.org/r1621462 ] PDFBOX-2283 : correct transform / clipping for appearance streams

            Based on the file in PDFBOX-2282 I have modified my fix (not attached but can do if wished) so that clipping is now done based on the appearance rectangle.

            More test pdfs with annotations, signatures or acroform welcome. I have only about 10 currently.

            tilman Tilman Hausherr added a comment - Based on the file in PDFBOX-2282 I have modified my fix (not attached but can do if wished) so that clipping is now done based on the appearance rectangle. More test pdfs with annotations, signatures or acroform welcome. I have only about 10 currently.

            People

              tilman Tilman Hausherr
              tilman Tilman Hausherr
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: