From fb3344c1e4d4ac8e8a6aa5605d052cee8cd4c3b1 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 30 Oct 2014 17:15:54 +0100 Subject: Introduced Process Information Map in PDFASError and SignResult --- pdf-as-cli/src/main/java/at/gv/egiz/pdfas/cli/Main.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pdf-as-cli/src/main') 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> infoIt = result.getProcessInformations().entrySet().iterator(); + + while(infoIt.hasNext()) { + Entry infoEntry = infoIt.next(); + logger.debug("Process Information: {} = {}", infoEntry.getKey(), infoEntry.getValue()); + } + fos.close(); System.out.println("Signed document " + outputFile); } -- cgit v1.2.3