[
https://issues.apache.org/jira/browse/PDFBOX-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16805354#comment-16805354
]
Tilman Hausherr commented on PDFBOX-4499:
-----------------------------------------
Agreed. So the workaround will be to find this annotation and then to add it to
the acroForm. First you'd have to go through all pages and search whether one
annotation is a signature:
{code:java}
if (COSName.SIG.equals(dict.getItem(COSName.FT)))
{
PDSignatureField sigField = new PDSignatureField(acroForm,
annot.getCOSObject(), null);
document.getDocumentCatalog().getAcroForm().getFields().add(sigField)
}
{code}
I wonder what software created this weird PDF. It claimed to have been created
by "Adobe InDesign CS3 (5.0.4)" but produced by "Mac OS X 10.13.4 Quartz
PDFContext". From my memory, "Quartz PDFContext" is a troublemaker, see also
the recent issue with the phantasy object numbers (PDFBOX-4495).
> PDDocument.getSignatureFields() does not return all existing signature fields
> -----------------------------------------------------------------------------
>
> Key: PDFBOX-4499
> URL: https://issues.apache.org/jira/browse/PDFBOX-4499
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm, Signing
> Affects Versions: 2.0.14
> Reporter: Noé Beuret
> Priority: Major
> Attachments: Form_example.pdf
>
>
> Hello,
> I'm having an issue with a PDF while trying to retrieve an existing signature
> field in the document.
> I'm using the method {{PDDocument.getSignatureFields()}} which return
> {{PDSignatureField}} objects on some PDF, but nothing on others which I'm
> sure they have signature fields.
> {noformat}
> PDDocument document = PDDocument.load(getDocumentData("Form_example.pdf"));
> assertNotEmpty(document.getSignatureFields());{noformat}
> One of those PDF is attached to the ticket. The signature field contained in
> the document can be signed on Adobe Reader and in a other close sourced
> commercial library. But on PDFBox, the signature field does not exist.
> Is it an issue or a known limitation of the library or I did I miss something
> ?
>
> Thanks
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]