[
https://issues.apache.org/jira/browse/PDFBOX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maruan Sahyoun updated PDFBOX-3524:
-----------------------------------
Fix Version/s: 2.0.4
> signatureField.setValue() not implemented
> -----------------------------------------
>
> Key: PDFBOX-3524
> URL: https://issues.apache.org/jira/browse/PDFBOX-3524
> Project: PDFBox
> Issue Type: Sub-task
> Components: Signing
> Affects Versions: 2.0.3
> Reporter: Tilman Hausherr
> Assignee: Maruan Sahyoun
> Fix For: 2.0.4, 2.1.0
>
>
> In the CreateEmptySignatureForm example, adding
> {code}
> signatureField.setValue(new PDSignature());
> {code}
> before saving brings this
> {code}
> 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)
> {code}
> Although there's nothing to construct, visual signing is a different area of
> PDFBox.
> What does work is this:
> {code}
> signatureField.getCOSObject().setItem(COSName.V, new PDSignature());
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]