You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2015/03/21 09:10:38 UTC

[jira] [Assigned] (PDFBOX-2719) The addSignature() method always set the visual signature on the last page of the PDF

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

Maruan Sahyoun reassigned PDFBOX-2719:
--------------------------------------

    Assignee: Maruan Sahyoun

> The addSignature() method always set the visual signature on the last page of the PDF
> -------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2719
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2719
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Signing
>    Affects Versions: 2.0.0
>            Reporter: Cyril Bremaud
>            Assignee: Maruan Sahyoun
>              Labels: easyfix
>
> The {{addSignature()}} method always set the visual signature on the last page of the PDF.
> This is certainly due to the following lines in {{PDDocument}} class :
> {code:title=PDDocument.java|borderStyle=solid}
> ...
> int startIndex = Math.max(Math.min(options.getPage(), 0), pageCount - 1);
> PDPage page = catalog.getPages().get(startIndex);
> ...
> {code}
> I think {{Math.min}} and {{Math.max}} have been inverted.



--
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