Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4, 3.0.0 PDFBox
    • Component/s: Signing
    • Labels:
      None

      Description

      In the CreateEmptySignatureForm example, adding

      signatureField.setValue(new PDSignature());
      

      before saving brings this

      Exception in thread "main" java.lang.UnsupportedOperationException: not implemented
      	at org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField.constructAppearances(PDSignatureField.java:237)
      	at org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:226)
      	at org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField.setValue(PDSignatureField.java:121)
      	at org.apache.pdfbox.examples.signature.CreateEmptySignatureForm.main(CreateEmptySignatureForm.java:84)
      

      Although there's nothing to construct, visual signing is a different area of PDFBox.

      What does work is this:

      signatureField.getCOSObject().setItem(COSName.V, new PDSignature());
      

      I wanted to add this line because this would make it possible to sign this specific field with PDFBox, due to the findSignatureField() method in PDDocument, which would allow to pre-fill a PDSignature object.

        Attachments

          Activity

            People

            • Assignee:
              msahyoun Maruan Sahyoun
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: