[
https://issues.apache.org/jira/browse/PDFBOX-3738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006668#comment-16006668
]
Tilman Hausherr commented on PDFBOX-3738:
-----------------------------------------
That is because /NeedAppearances is set. I moved that code to the example for
the reason I mentioned earlier. So you need to add this (adjusted depending on
your needs) to your own code:
{code}
PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm();
if (acroForm != null && acroForm.getNeedAppearances())
{
// PDFBOX-3738 NeedAppearances true results in visible
signature becoming invisible
// with Adobe Reader
if (acroForm.getFields().isEmpty())
{
// we can safely delete it if there are no fields
acroForm.getCOSObject().removeItem(COSName.NEED_APPEARANCES);
// note that if you've set MDP permissions, the removal of
this item
// may result in Adobe Reader claiming that the document
has been changed.
// and/or that field content won't be displayed properly.
// ==> decide what you prefer and adjust your code
accordingly.
}
else
{
System.out.println("/NeedAppearances is set, signature may
be ignored by Adobe Reader");
}
}
{code}
> Signature not visible on Acrobat
> --------------------------------
>
> Key: PDFBOX-3738
> URL: https://issues.apache.org/jira/browse/PDFBOX-3738
> Project: PDFBox
> Issue Type: Bug
> Components: Signing
> Affects Versions: 2.0.5
> Environment: Java 1.8
> Reporter: Marco Monacelli
> Assignee: Tilman Hausherr
> Priority: Blocker
> Fix For: 2.0.6, 3.0.0
>
> Attachments: PDDocument.patch, prova2_orig.pdf,
> prova2_orig_signed_iText.pdf, prova2_orig_signed.pdf,
> prova2_orig_signed_pdfbox.pdf, prova2_orig_signed_pdfbox_resigned_ds.pdf
>
>
> Signing this specific file with PDFBox, I get a non-visible signature in
> Acrobat.
> Using iText the signature is visible.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]