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

ClassCastException in PDDocument.addSignature

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.9, 1.8.10, 2.0.0
    • Fix Version/s: 1.8.10, 2.0.0
    • Component/s: Signing
    • Labels:
      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 Michael Klink, our code fails with an object reference.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: