You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Lonzak (JIRA)" <ji...@apache.org> on 2016/11/01 09:44:58 UTC
[jira] [Commented] (PDFBOX-3524) signatureField.setValue() not
implemented
[ https://issues.apache.org/jira/browse/PDFBOX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15624947#comment-15624947 ]
Lonzak commented on PDFBOX-3524:
--------------------------------
[~msahyoun] Yes perfect that did the trick...
By the way how did you highlight the _UnsupportedOperationException_ in your post?
> 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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org