pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1764782 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible: PDFTemplateCreator.java PDVisibleSigBuilder.java
Date Thu, 13 Oct 2016 20:16:29 GMT
Author: tilman
Date: Thu Oct 13 20:16:29 2016
New Revision: 1764782

URL: http://svn.apache.org/viewvc?rev=1764782&view=rev
Log:
PDFBOX-3017: remove confusing and unneeded use of getSignatureFieldName()

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/PDVisibleSigBuilder.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=1764782&r1=1764781&r2=1764782&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
Thu Oct 13 20:16:29 2016
@@ -102,7 +102,7 @@ public class PDFTemplateCreator
         // The line below has no effect with the CreateVisibleSignature example. 
         // The signature field is needed as a "holder" for the /AP tree, 
         // but the /P and /V PDSignatureField entries are ignored by PDDocument.addSignature
-        pdfBuilder.createSignature(pdSignatureField, page, properties.getSignatureFieldName());
+        pdfBuilder.createSignature(pdSignatureField, page, "");
        
         // that is /AcroForm/DR entry
         pdfBuilder.createAcroFormDictionary(acroForm, pdSignatureField);

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=1764782&r1=1764781&r2=1764782&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
Thu Oct 13 20:16:29 2016
@@ -119,7 +119,10 @@ public class PDVisibleSigBuilder impleme
         pdSignatureField.setValue(pdSignature);
         widget.setPage(page);
         page.getAnnotations().add(widget);
-        pdSignature.setName(signerName);
+        if (!signerName.isEmpty())
+        {
+            pdSignature.setName(signerName);
+        }
         pdfStructure.setPdSignature(pdSignature);
         log.info("PDSignature has been created");
     }



Mime
View raw message