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

ClassCastException when matrix array has indirect objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.13, 2.0.8
    • 1.8.14, 2.0.9, 3.0.0 PDFBox
    • PDModel
    • None

    Description

      ClassCastException: org.apache.pdfbox.cos.COSObject cannot be cast to org.apache.pdfbox.cos.COSNumber
          org.apache.pdfbox.util.Matrix.<init>(Matrix.java:60)
          org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern.getMatrix(PDAbstractPattern.java:135)
      

      Solution: replace get() with getObject(). I created the attached file by modifying COSWriter.

      Attachments

        1. PDFBOX-4030-indirect.pdf
          2 kB
          Tilman Hausherr

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: