[
https://issues.apache.org/jira/browse/PDFBOX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15612884#comment-15612884
]
Maruan Sahyoun commented on PDFBOX-3524:
----------------------------------------
[~tilman] What we might be able to do is to drop the appearance generation
(which is the really missing part here) for 2.0.4 and reenable that in 2.1.0 as
soon as that's done - WDYT? Could do it this weekend if we agree on that.
> 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
> Fix For: 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]