pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1799763 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
Date Sat, 24 Jun 2017 11:40:06 GMT
Author: tilman
Date: Sat Jun 24 11:40:05 2017
New Revision: 1799763

URL: http://svn.apache.org/viewvc?rev=1799763&view=rev
Log:
PDFBOX-3820: add constructor for signing existing signature fields, as suggested by Lonzak

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java?rev=1799763&r1=1799762&r2=1799763&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDVisibleSignDesigner.java
Sat Jun 24 11:40:05 2017
@@ -151,6 +151,18 @@ public class PDVisibleSignDesigner
         calculatePageSize(document, page);
     }
 
+    /**
+     * Constructor usable for signing existing signature fields.
+     *
+     * @param imageStream image as a stream
+     * @throws IOException
+     */
+    public PDVisibleSignDesigner(InputStream imageStream) throws IOException
+    {
+        // set visible signature image Input stream
+        readImageStream(imageStream);
+    }
+
     private void calculatePageSizeFromFile(String filename, int page) throws IOException
     {
         try (PDDocument document = PDDocument.load(new File(filename)))



Mime
View raw message