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

ClassCastException in COSWriter.write() when saving PDF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.12, 1.8.13, 2.0.2, 2.0.3, 3.0.0 PDFBox
    • 1.8.13, 2.0.3, 3.0.0 PDFBox
    • Writing
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: