pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1815345 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible: PDFTemplateCreator.java PDVisibleSignDesigner.java
Date Wed, 15 Nov 2017 18:05:25 GMT
Author: tilman
Date: Wed Nov 15 18:05:25 2017
New Revision: 1815345

URL: http://svn.apache.org/viewvc?rev=1815345&view=rev
Log:
PDFBOX-4011: new methods with int array, deprecate methods with byte array, use new methods

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateCreator.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateCreator.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateCreator.java?rev=1815345&r1=1815344&r2=1815345&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateCreator.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateCreator.java
Wed Nov 15 18:05:25 2017
@@ -113,7 +113,7 @@ public class PDFTemplateCreator
        
         // rectangle, formatter, image. /AcroForm/DR/XObject contains that form
         pdfBuilder.createSignatureRectangle(pdSignatureField, properties);
-        pdfBuilder.createFormatterRectangle(properties.getFormatterRectangleParams());
+        pdfBuilder.createFormatterRectangle(properties.getFormatterRectangleParameters());
         PDRectangle formatter = pdfStructure.getFormatterRectangle();
         pdfBuilder.createSignatureImage(template, properties.getImage());
 

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java?rev=1815345&r1=1815344&r2=1815345&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
Wed Nov 15 18:05:25 2017
@@ -49,6 +49,7 @@ public class PDVisibleSignDesigner
     private BufferedImage image;
     private String signatureFieldName = "sig";
     private byte[] formatterRectangleParams = { 0, 0, 100, 50 };
+    private int[] formatterRectangleParameters = { 0, 0, 100, 50 };
     private AffineTransform affineTransform = new AffineTransform();
     private float imageSizeInPercents;
     private int rotation = 0;
@@ -211,7 +212,7 @@ public class PDVisibleSignDesigner
 
     /**
      * Adjust signature for page rotation. This is optional, call this after all x and y
coordinates
-     * have been set if you want the signature to be postioned regardless of page orientation.
+     * have been set if you want the signature to be positioned regardless of page orientation.
      *
      * @return Visible Signature Configuration Object
      */
@@ -514,26 +515,50 @@ public class PDVisibleSignDesigner
     }
     
     /**
-     * 
-     * @return formatter PDRectanle parameters
+     * @return formatter PDRectangle parameters
+     * @deprecated use {@link #getFormatterRectangleParameters() getFormatterRectangleParameters()}
      */
+    @Deprecated
     public byte[] getFormatterRectangleParams()
     {
         return formatterRectangleParams;
     }
 
     /**
+     * 
+     * @return formatter PDRectangle parameters
+     */
+    public int[] getFormatterRectangleParameters()
+    {
+        return formatterRectangleParameters;
+    }
+
+    /**
      * Sets formatter PDRectangle
      * 
      * @param formatterRectangleParams
      * @return Visible Signature Configuration Object
+     * @deprecated use {@link #formatterRectangleParameters(int[]) formatterRectangleParameters(int[])}
      */
+    @Deprecated
     public PDVisibleSignDesigner formatterRectangleParams(byte[] formatterRectangleParams)
     {
         this.formatterRectangleParams = formatterRectangleParams;
         return this;
     }
 
+    /**
+     * Sets formatter PDRectangle
+     * 
+     * @param formatterRectangleParameters
+     * @return Visible Signature Configuration Object
+     */
+    public PDVisibleSignDesigner formatterRectangleParameters(int[] formatterRectangleParameters)
+    {
+        this.formatterRectangleParameters = formatterRectangleParameters;
+        return this;
+    }
+
     /**
      * 
      * @return page width



Mime
View raw message