Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.5, 1.8.6, 1.8.7, 2.0.0
    • Fix Version/s: 1.8.7, 2.0.0
    • Component/s: Rendering
    • Labels:
      None

      Description

      The attached PDF draws a text filled with horizontal shading going from red to blue. When rendered via PDFBox, the text is completely filled with red. The problem is that AxialShadingContext#getRaster() gets called with positions that completely fell outside of the range stored in its coords[] field. The fix seems to be to set glyph transform rather than graphics2d transform in PageDrawer#writeText() as shown in the attached patch.

        Attachments

        1. PDFBOX-2135.pdf-2.png-diff.png
          5 kB
          Tilman Hausherr
        2. PDFBOX-2135.pdf-2.png
          186 kB
          Tilman Hausherr
        3. PDFBOX-1917.pdf-9.png-diff.png
          5 kB
          Tilman Hausherr
        4. PDFBOX-1917.pdf-9.png
          42 kB
          Tilman Hausherr
        5. PDFBOX-1917.pdf-1.png-diff.png
          4 kB
          Tilman Hausherr
        6. PDFBOX-1917.pdf-1.png
          83 kB
          Tilman Hausherr
        7. pattern-shading-2-4-noMatrix.pdf
          6 kB
          Tilman Hausherr
        8. pattern-shading-2-4-idMatrix1.jpg
          739 kB
          Tilman Hausherr
        9. pattern-shading-2-4-idMatrix.pdf
          6 kB
          Tilman Hausherr
        10. pattern-shading-2-4-idMatrix.pdf
          6 kB
          Tilman Hausherr
        11. pattern-shading-2-4.ps
          2 kB
          Tilman Hausherr
        12. pattern-shading-2-4.ps
          2 kB
          Tilman Hausherr
        13. PageDrawer.writeFont.java.patch
          1 kB
          Petr Slaby
        14. 000004_ShadingPatternTextPDF.pdf
          1 kB
          Petr Slaby

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pslabycz Petr Slaby
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: