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 2016/11/04 10:46:58 UTC

[jira] [Commented] (PDFBOX-3547) [Patch] Improved signing of existing signature fields

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

Tilman Hausherr commented on PDFBOX-3547:
-----------------------------------------

[~msahyoun] In {{PDAcroForm.getField()}} is there a reason that you used {{compareTo()}} instead of equals() or is it just style ? I'm asking because this results in an NPE if {{fullyQualifiedName}} is null.

> [Patch] Improved signing of existing signature fields
> -----------------------------------------------------
>
>                 Key: PDFBOX-3547
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3547
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Signing
>    Affects Versions: 2.0.4
>            Reporter: Lonzak
>            Assignee: Tilman Hausherr
>             Fix For: 2.0.4, 2.1.0
>
>         Attachments: CreateVisibleSignature.patch, PDDocument.patch
>
>
> *Short*: The handling of signing existing signature fields must be improved (and this patch is part of that effort).
> *Details and background*
> The current implementation for visible signatures always adds new signature fields when signing documents.
> In that case for that signature everything has to be definied (field properties,  coordinates etc.).
> Another quite common use case is the use of an existing signature field which should be signed. 
> There are basically two different roles: The *document creator* who creates the document with all its texts, graphics and form fields. The creator knows best where everything should be positioned and is even sometimes bound by certain regulations etc. The document creator defines his intend with the "Usage rights" and may add a usage right signature.
> Then later a *document user* e.g. a customer fills out form fields and signs those predefined signature fields. 
> In that case the coordinates and a lot of attributes are alrady defined and there is no need (and sometimes it is even forbidden) to change the physical attributes of those signature fields. The only two things which are of interest is to set the signature dictionary and to recreate the appearance.
> In the current implementation however one needs to define the coordinates of an existing signature field again. But not enough since the screen coordinates in java (and in the PDFBox PDVisibleSigBuilder) and PDF coordinates have a different origin one must convert those existing PDF coordinates to screen coordinates which are later converted to PDF coordinates again. This is cumbersome, error prone and totally unecessary... With the supplied patch there is no conversion of coordinates anymore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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