You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ryuukei (JIRA)" <ji...@apache.org> on 2017/07/04 08:49:00 UTC

[jira] [Commented] (PDFBOX-3853) Invisible signature's page catalog tree is not updated

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

ryuukei commented on PDFBOX-3853:
---------------------------------

[~tilman] I studied your comment and related issue, it is talking about the how the appearance should be handled for invisible signature. And I don't agree that non visible signature no need to have annotation. Your comment again verified the invisible signature belongs to the category annotation. What I read from the specification is that, all annotation should be in the catalog tree pages/page/annot. That's the reason why I'm thinking the catalog tree for invisible signature should also be updated? (Perhaps?) In such way, the result pdf (pdf with invisible signature) complies with the specification.

Refer to [PDF 1.7 specification|http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf], page 137, section 3.6 Document Structure,
A PDF document can be regarded as a hierarchy of objects contained in the
body section of a PDF file. At the root of the hierarchy is the document’s catalog
dictionary (see Section 3.6.1, “Document Catalog”). Most of the objects in the
hierarchy are dictionaries. For example, each page of the document is
represented by a page object—a dictionary that includes references to the page’s
contents and other attributes, such as its thumbnail image (Section 8.2.3,
“Thumbnail Images”) and {color:red}*any annotations*{color} (Section 8.4, “Annotations”)
associated with it.

Another quote from page 605, section 8.4.1 Annotation Dictionaries:
The optional Annots entry in a page object (see “Page Objects” on page 144)
holds an array of annotation dictionaries, each representing an annotation associ-
ated with the given page.

> Invisible signature's page catalog tree is not updated
> ------------------------------------------------------
>
>                 Key: PDFBOX-3853
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3853
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Signing
>    Affects Versions: 2.0.6
>            Reporter: ryuukei
>            Priority: Minor
>              Labels: signature
>         Attachments: PDDocument.patch
>
>
> According latest Acrobat PDF 1.7 speficication:
> http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf
> Page 695, section [Signature Fields]:
> * quote 1:
> The field type ( FT ) is Sig , and the field value
> ( V ) is a signature dictionary containing the signature and specifying various at-
> tributes of the signature field.
> * quote 2:
> Like any other field, a signature field may actually be described by a widget anno-
> tation dictionary containing entries pertaining to an annotation as well as a field
> (see “Widget Annotations” on page 640). The annotation rectangle ( Rect ) in such
> a dictionary gives the position of the field on its page. Signature fields that are not
> intended to be visible should have an annotation rectangle that has zero height
> and width.
> All in all, invisible signature also should be as a Signature Field, which is one type of Annotation, thus the page catalog tree should be updated as well. 
> For fixing this improvement issue, in the class PDDocument.java L351~L353, instead of terminating the process after [prepareVisibleSignature] by return, continue with later on annotation update process would be better.  
> Personally I'm using itext-rups to analyse the pdf catalog structure, after applying the patch, the signature present in the catalog tree pages/page/annot/sig correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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