You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2022/11/28 18:54:00 UTC

[jira] [Commented] (PDFBOX-5549) Invisible signature field is not referenced from /Annots dictionary of a Page

    [ https://issues.apache.org/jira/browse/PDFBOX-5549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17640197#comment-17640197 ] 

Tilman Hausherr commented on PDFBOX-5549:
-----------------------------------------

I did work on this and I don't know. Maybe it wasn't needed, and the less code, the better. What I do remember is that initially we didn't have that empty rectangle but one specification mentioned it so we added it.

> Invisible signature field is not referenced from /Annots dictionary of a Page
> -----------------------------------------------------------------------------
>
>                 Key: PDFBOX-5549
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5549
>             Project: PDFBox
>          Issue Type: Improvement
>    Affects Versions: 2.0.27
>            Reporter: Aleksandr Beliakov
>            Priority: Minor
>
> Hello,
>  
> Recently we received a complain about not adding a reference to the newly created signature field to the /Annots array of a page dictionary.
> After analyzing the code, we found that PdfBox dependency used in our project, skips binding of an invisible signature field from a page dictionary. See [PDDocument.java#L455:|https://github.com/apache/pdfbox/blob/2.0.27/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java#L455]
> {code:java}
> if (visualSignature == null) 
> {
>     prepareNonVisibleSignature(firstWidget);
>     return;
> } {code}
> while adding the signature widget to the given page for visible signature after.
>  
> After analyzing ISO 32000-1/2 I was not able to conclude what is the expected behavior in case of invisible signature. While _/Annots_ array within a page dictionary is optional and shall contain references to annotations associated with a page, the chapter "12.5.2 Annotation dictionaries" also tells "{+}_A given annotation dictionary shall be referenced from the Annots array of only one page._{+}", which is also ambiguous.
> After checking [OpenPDF|https://github.com/LibrePDF/OpenPDF] library, it seems like they associate an invisible signature field with a first page explicitly by providing the reference within /Annots array.
>  
> Could you please give us information about the rational for skipping the invisible signature field from adding into a page's /Annots dictionary and confirm whether the behavior is correct?
>  
> Thank you!
>  
> Best regards,
> Aleksandr.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org