pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1753587 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
Date Wed, 20 Jul 2016 18:06:40 GMT
Author: tilman
Date: Wed Jul 20 18:06:40 2016
New Revision: 1753587

URL: http://svn.apache.org/viewvc?rev=1753587&view=rev
Log:
PDFBOX-3017: revert premature name change; rename parameter names; improve javadoc

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java?rev=1753587&r1=1753586&r2=1753587&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSigBuilder.java
Wed Jul 20 18:06:40 2016
@@ -44,7 +44,8 @@ import org.apache.pdfbox.pdmodel.interac
 import org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField;
 
 /**
- * Implementation of {@link PDFTemplateBuilder}.
+ * Implementation of {@link PDFTemplateBuilder}. This builds the signature PDF but doesn't
keep the
+ * elements, these are kept in its PDF template structure.
  *
  * @author Vakhtang Koroghlishvili
  */
@@ -54,7 +55,7 @@ public class PDVisibleSigBuilder impleme
     private static final Log log = LogFactory.getLog(PDVisibleSigBuilder.class);
 
     /**
-     * Constructor.
+     * Constructor, creates PDF template structure.
      */
     public PDVisibleSigBuilder()
     {
@@ -71,6 +72,13 @@ public class PDVisibleSigBuilder impleme
         log.info("PDF page has been created");
     }
 
+    /**
+     * Creates a PDDocument and adds the page parameter to it and keeps this as a template
in the
+     * PDF template Structure.
+     *
+     * @param page
+     * @throws IOException
+     */
     @Override
     public void createTemplate(PDPage page) throws IOException
     {
@@ -103,15 +111,15 @@ public class PDVisibleSigBuilder impleme
     }
 
     @Override
-    public void createSignature(PDSignatureField pdSignatureField, PDPage page,
-                                String signatureName) throws IOException
+    public void createSignature(PDSignatureField pdSignatureField, PDPage page, String signerName)
+            throws IOException
     {
         PDSignature pdSignature = new PDSignature();
         PDAnnotationWidget widget = pdSignatureField.getWidgets().get(0);
         pdSignatureField.setValue(pdSignature);
         widget.setPage(page);
         page.getAnnotations().add(widget);
-        pdSignature.setName(signatureName);
+        pdSignature.setName(signerName);
         pdfStructure.setPdSignature(pdSignature);
         log.info("PDSignature has been created");
     }
@@ -241,7 +249,7 @@ public class PDVisibleSigBuilder impleme
     public void createInnerFormStream(PDDocument template)
     {
         PDStream innerFormStream = new PDStream(template);
-        pdfStructure.setInnerFormStream(innerFormStream);
+        pdfStructure.setInnterFormStream(innerFormStream);
         log.info("Stream of another form (inner form - it will be inside holder form) " +
                  "has been created");
     }



Mime
View raw message