aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-30 17:15:54 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-30 17:15:54 +0100
commitfb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1 (patch)
tree01e04f2f9e9286c02bbc55699d027150180bbe01 /pdf-as-cli
parente123b037e65b336c677c0a66125ae85f5827417a (diff)
downloadpdf-as-4-fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1.tar.gz
pdf-as-4-fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1.tar.bz2
pdf-as-4-fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1.zip
Introduced Process Information Map in PDFASError and SignResult
Diffstat (limited to 'pdf-as-cli')
-rw-r--r--pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
index d847f31b..a513ccf7 100644
--- a/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
+++ b/pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java
@@ -28,6 +28,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Iterator;
import java.util.List;
+import java.util.Map.Entry;
import java.util.UUID;
import javax.activation.DataSource;
@@ -39,6 +40,8 @@ import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
import at.gv.egiz.pdfas.common.exceptions.PDFASError;
import at.gv.egiz.pdfas.common.utils.StreamUtils;
@@ -111,6 +114,8 @@ public class Main {
public static final String STANDARD_POSITION_STRING = "x:auto;y:auto;w:auto;p:auto;f:0";
+ private static final Logger logger = LoggerFactory.getLogger(Main.class);
+
private static Options createOptions() {
Options cliOptions = new Options();
@@ -418,6 +423,13 @@ public class Main {
@SuppressWarnings("unused")
SignResult result = pdfAs.sign(signParameter);
+ Iterator<Entry<String, String>> infoIt = result.getProcessInformations().entrySet().iterator();
+
+ while(infoIt.hasNext()) {
+ Entry<String, String> infoEntry = infoIt.next();
+ logger.debug("Process Information: {} = {}", infoEntry.getKey(), infoEntry.getValue());
+ }
+
fos.close();
System.out.println("Signed document " + outputFile);
}