pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1675142 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
Date Tue, 21 Apr 2015 15:56:43 GMT
Author: tilman
Date: Tue Apr 21 15:56:42 2015
New Revision: 1675142

URL: http://svn.apache.org/r1675142
Log:
PDFBOX-2768: add method that has a file parameter

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java?rev=1675142&r1=1675141&r2=1675142&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java
Tue Apr 21 15:56:42 2015
@@ -17,6 +17,7 @@
 package org.apache.pdfbox.pdmodel.interactive.digitalsignature;
 
 import java.io.Closeable;
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -62,6 +63,19 @@ public class SignatureOptions implements
     }
   
     /**
+     * Reads the visual signature from the given file.
+     *  
+     * @param is the file containing the visual signature
+     * @throws IOException when something went wrong during parsing 
+     */
+    public void setVisualSignature(File file) throws IOException
+    { 
+        PDFParser parser = new PDFParser(file);
+        parser.parse();
+        visualSignature = parser.getDocument();
+    }
+    
+    /**
      * Reads the visual signature from the given input stream.
      *  
      * @param is the input stream containing the visual signature



Mime
View raw message