[ 
https://issues.apache.org/jira/browse/PDFBOX-6307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-6307:
------------------------------------
    Fix Version/s: 2.0.38
                   3.0.9 PDFBox
                   4.0.0

> Add option to PDVisibleSignDesigner to use page user space coordinates for 
> the signature rectangle
> --------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-6307
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6307
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Signing
>    Affects Versions: 2.0.36, 2.0.37, 2.0.38
>            Reporter: Evandro Magalhaes Leite Junior
>            Priority: Minor
>              Labels: patch, pull-request-available
>             Fix For: 2.0.38, 3.0.9 PDFBox, 4.0.0
>
>
> PDVisibleSigBuilder.createSignatureRectangle() always converts the y position 
> with the template height (the lower left y is {{templateHeight - yAxis - 
> height}}). This assumes that yAxis is measured from the top of the template.
>   Callers that already have coordinates in the default user space of the page 
> (origin at the lower left of the unrotated page) cannot place the
>   visible signature exactly where they want without compensating for this 
> conversion. This is especially awkward for pages with a /Rotate
>   entry.
>   Proposal: add an opt-in option 
> PDVisibleSignDesigner.useUserSpaceCoordinates(boolean) (getter 
> isUseUserSpaceCoordinates()), default
>   false. When enabled, xAxis and yAxis are used as the lower left corner of 
> the rectangle, and the upper right corner is {{xAxis +  width}}, yAxis + 
> height. The page rotation is not taken into account. The default behaviour is 
> unchanged.
>   The behaviour is documented in the javadoc of 
> PDFTemplateBuilder.createSignatureRectangle() and of the new methods. A unit 
> test
>   (PDVisibleSignDesignerTest) covers both modes.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to