pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1819215 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible: PDFTemplateBuilder.java PDFTemplateCreator.java PDVisibleSigBuilder.java
Date Sun, 24 Dec 2017 12:09:01 GMT
Author: tilman
Date: Sun Dec 24 12:09:01 2017
New Revision: 1819215

URL: http://svn.apache.org/viewvc?rev=1819215&view=rev
Log:
PDFBOX-2852: clarify parameter names

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java
    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/PDVisibleSigBuilder.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java?rev=1819215&r1=1819214&r2=1819215&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java
Sun Dec 24 12:09:01 2017
@@ -166,10 +166,10 @@ public interface PDFTemplateBuilder
      * 
      * @param holderFormResources
      * @param holderFormStream
-     * @param formrect
+     * @param bbox
      */
     void createHolderForm(PDResources holderFormResources, PDStream holderFormStream,
-            PDRectangle formrect);
+            PDRectangle bbox);
 
     /**
      * Creates appearance dictionary
@@ -196,10 +196,9 @@ public interface PDFTemplateBuilder
      * 
      * @param innerFormResources
      * @param innerFormStream
-     * @param formrect
+     * @param bbox
      */
-    void createInnerForm(PDResources innerFormResources, PDStream innerFormStream,
-            PDRectangle formrect);
+    void createInnerForm(PDResources innerFormResources, PDStream innerFormStream, PDRectangle
bbox);
 
     /**
      * 
@@ -226,13 +225,13 @@ public interface PDFTemplateBuilder
      * @param imageFormResources
      * @param innerFormResource
      * @param imageFormStream
-     * @param formrect
+     * @param bbox
      * @param affineTransform
      * @param img
      * @throws IOException
      */
     void createImageForm(PDResources imageFormResources, PDResources innerFormResource,
-            PDStream imageFormStream, PDRectangle formrect, AffineTransform affineTransform,
+            PDStream imageFormStream, PDRectangle bbox, AffineTransform affineTransform,
             PDImageXObject img) throws IOException;
 
     /**

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=1819215&r1=1819214&r2=1819215&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
Sun Dec 24 12:09:01 2017
@@ -114,7 +114,7 @@ public class PDFTemplateCreator
         // rectangle, formatter, image. /AcroForm/DR/XObject contains that form
         pdfBuilder.createSignatureRectangle(pdSignatureField, properties);
         pdfBuilder.createFormatterRectangle(properties.getFormatterRectangleParameters());
-        PDRectangle formatter = pdfStructure.getFormatterRectangle();
+        PDRectangle bbox = pdfStructure.getFormatterRectangle();
         pdfBuilder.createSignatureImage(template, properties.getImage());
 
         // create form stream, form and  resource. 
@@ -122,7 +122,7 @@ public class PDFTemplateCreator
         PDStream holderFormStream = pdfStructure.getHolderFormStream();
         pdfBuilder.createHolderFormResources();
         PDResources holderFormResources = pdfStructure.getHolderFormResources();
-        pdfBuilder.createHolderForm(holderFormResources, holderFormStream, formatter);
+        pdfBuilder.createHolderForm(holderFormResources, holderFormStream, bbox);
         
         // that is /AP entry the appearance dictionary.
         pdfBuilder.createAppearanceDictionary(pdfStructure.getHolderForm(), pdSignatureField);
@@ -131,7 +131,7 @@ public class PDFTemplateCreator
         pdfBuilder.createInnerFormStream(template);
         pdfBuilder.createInnerFormResource();
         PDResources innerFormResource = pdfStructure.getInnerFormResources();
-        pdfBuilder.createInnerForm(innerFormResource, pdfStructure.getInnerFormStream(),
formatter);
+        pdfBuilder.createInnerForm(innerFormResource, pdfStructure.getInnerFormStream(),
bbox);
         PDFormXObject innerForm = pdfStructure.getInnerForm();
        
         // inner form must be in the holder form as we wrote
@@ -142,10 +142,10 @@ public class PDFTemplateCreator
         PDStream imageFormStream = pdfStructure.getImageFormStream();
         pdfBuilder.createImageFormResources();
         PDResources imageFormResources = pdfStructure.getImageFormResources();
-        pdfBuilder.createImageForm(imageFormResources, innerFormResource, imageFormStream,
formatter,
+        pdfBuilder.createImageForm(imageFormResources, innerFormResource, imageFormStream,
bbox,
                 transform, pdfStructure.getImage());
         
-        pdfBuilder.createBackgroundLayerForm(innerFormResource, formatter);
+        pdfBuilder.createBackgroundLayerForm(innerFormResource, bbox);
        
         // now inject procSetArray
         pdfBuilder.injectProcSetArray(innerForm, page, innerFormResource, imageFormResources,

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java?rev=1819215&r1=1819214&r2=1819215&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
Sun Dec 24 12:09:01 2017
@@ -253,11 +253,11 @@ public class PDVisibleSigBuilder impleme
 
     @Override
     public void createHolderForm(PDResources holderFormResources, PDStream holderFormStream,
-                                 PDRectangle formrect)
+                                 PDRectangle bbox)
     {
         PDFormXObject holderForm = new PDFormXObject(holderFormStream);
         holderForm.setResources(holderFormResources);
-        holderForm.setBBox(formrect);
+        holderForm.setBBox(bbox);
         holderForm.setFormType(1);
         pdfStructure.setHolderForm(holderForm);
         LOG.info("Holder form has been created");
@@ -299,12 +299,13 @@ public class PDVisibleSigBuilder impleme
     }
 
     @Override
-    public void createInnerForm(PDResources innerFormResources, PDStream innerFormStream,
-                                PDRectangle formrect)
+    public void createInnerForm(PDResources innerFormResources,
+                                PDStream innerFormStream,
+                                PDRectangle bbox)
     {
         PDFormXObject innerForm = new PDFormXObject(innerFormStream);
         innerForm.setResources(innerFormResources);
-        innerForm.setBBox(formrect);
+        innerForm.setBBox(bbox);
         innerForm.setFormType(1);
         pdfStructure.setInnerForm(innerForm);
         LOG.info("Another form (inner form - it will be inside holder form) has been created");
@@ -312,7 +313,7 @@ public class PDVisibleSigBuilder impleme
 
     @Override
     public void insertInnerFormToHolderResources(PDFormXObject innerForm,
-                                                PDResources holderFormResources)
+                                                 PDResources holderFormResources)
     {
         holderFormResources.put(COSName.FRM, innerForm);
         pdfStructure.setInnerFormName(COSName.FRM);
@@ -337,11 +338,11 @@ public class PDVisibleSigBuilder impleme
 
     @Override
     public void createImageForm(PDResources imageFormResources, PDResources innerFormResource,
-                                PDStream imageFormStream, PDRectangle formrect, AffineTransform
at,
+                                PDStream imageFormStream, PDRectangle bbox, AffineTransform
at,
                                 PDImageXObject img) throws IOException
     {
         PDFormXObject imageForm = new PDFormXObject(imageFormStream);
-        imageForm.setBBox(formrect);
+        imageForm.setBBox(bbox);
         imageForm.setMatrix(at);
         imageForm.setResources(imageFormResources);
         imageForm.setFormType(1);
@@ -358,12 +359,12 @@ public class PDVisibleSigBuilder impleme
     }
 
     @Override
-    public void createBackgroundLayerForm(PDResources innerFormResource, PDRectangle formatter)
+    public void createBackgroundLayerForm(PDResources innerFormResource, PDRectangle bbox)
              throws IOException
     {
         // create blank n0 background layer form
         PDFormXObject n0Form = new PDFormXObject(pdfStructure.getTemplate().getDocument().createCOSStream());
-        n0Form.setBBox(formatter);
+        n0Form.setBBox(bbox);
         n0Form.setResources(new PDResources());
         n0Form.setFormType(1);
         innerFormResource.put(COSName.getPDFName("n0"), n0Form);



Mime
View raw message