pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1668206 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel: PDDocument.java interactive/digitalsignature/SignatureOptions.java
Date Sat, 21 Mar 2015 08:29:13 GMT
Author: msahyoun
Date: Sat Mar 21 08:29:13 2015
New Revision: 1668206

URL: http://svn.apache.org/r1668206
Log:
PDFBOX-2719 don't set signature always at last page

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1668206&r1=1668205&r2=1668206&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Sat Mar 21
08:29:13 2015
@@ -198,7 +198,7 @@ public class PDDocument implements Close
             throw new IllegalStateException("Cannot sign an empty document");
         }
 
-        int startIndex = Math.max(Math.min(options.getPage(), 0), pageCount - 1);
+        int startIndex = Math.min(Math.max(options.getPage(), 0), pageCount - 1);
         PDPage page = catalog.getPages().get(startIndex);
 
         // Get the AcroForm from the Root-Dictionary and append the annotation

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java?rev=1668206&r1=1668205&r2=1668206&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
Sat Mar 21 08:29:13 2015
@@ -38,7 +38,7 @@ public class SignatureOptions implements
      */
     public SignatureOptions()
     {
-        pageNo = 1;
+        pageNo = 0;
     }
 
     /**



Mime
View raw message