[
https://issues.apache.org/jira/browse/PDFBOX-4511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815566#comment-16815566
]
Tilman Hausherr commented on PDFBOX-4511:
-----------------------------------------
I looked at a few signed files and most have "signature1", "signature2" or
"Unterschrift" as field name but never a person name.
The risk of your suggestion is that the user doesn't check whether the field
already exists.
The user could do this by calling {{getSignatureFields()}} *after* the
{{addSignature()}} call and use the last item (works only with new signature
fields, not if one was signing an existing field). Another way would be this
code:
{code:java}
for (PDSignatureField signatureField : doc.getSignatureFields())
{
if
(signatureField.getSignature().getCOSObject().equals(signature.getCOSObject()))
{
signatureField.setPartialName("Best signature field ever");
}
}
{code}
> Add name to signature field
> ---------------------------
>
> Key: PDFBOX-4511
> URL: https://issues.apache.org/jira/browse/PDFBOX-4511
> Project: PDFBox
> Issue Type: Improvement
> Components: Signing
> Affects Versions: 2.0.14
> Reporter: Luiz
> Priority: Major
> Labels: patch
> Attachments: field_name.jpg, signatureFieldName.patch
>
>
> I've implemented an adjust to add signature field name on method
> {code:java}
> addSignature(PDSignature sigObject, SignatureInterface signatureInterface,
> SignatureOptions options){code}
> Only add if PDSignature contains a name.
> Adobe Reader shows the name as you can see in field_name.jpg.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]