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

ClassCastException in COSWriter.write() when saving PDF

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.12, 1.8.13, 2.0.2, 2.0.3, 3.0.0 PDFBox
    • Fix Version/s: 1.8.13, 2.0.3, 3.0.0 PDFBox
    • Component/s: Writing
    • Labels:
      None

      Description

      Exception in thread "main" java.lang.ClassCastException: org.apache.pdfbox.cos.COSInteger cannot be cast to org.apache.pdfbox.cos.COSArray
      	at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1349)
      	at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1287)
      	at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1160)
      	at pdfboxpageimageextraction.LoadSave.main(LoadSave.java:22)
      

      The cause is a bad /ID, that isn't an array.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: