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

ClassCastException in PDDocument.addSignature

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.9, 1.8.10, 2.0.0
    • 1.8.10, 2.0.0
    • Signing
    • None

    Description

      As reported here in 2013:
      http://stackoverflow.com/questions/17452869/pdfbox-add-visual-signature-cosobject-cast-error

      Exception in thread "main" java.lang.ClassCastException: org.apache.pdfbox.cos.COSObject cannot be cast to org.apache.pdfbox.cos.COSDictionary at org.apache.pdfbox.pdmodel.PDDocument.addSignature(PDDocument.java:474)
      

      The cause is explained in the answer by mkl, our code fails with an object reference.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: