aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/demo/SignatureCreationDemo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/demo/SignatureCreationDemo.java')
-rw-r--r--src/main/java/demo/SignatureCreationDemo.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/demo/SignatureCreationDemo.java b/src/main/java/demo/SignatureCreationDemo.java
index c43b45e..465a0bf 100644
--- a/src/main/java/demo/SignatureCreationDemo.java
+++ b/src/main/java/demo/SignatureCreationDemo.java
@@ -12,6 +12,7 @@ import at.gv.egiz.pdfas.api.exceptions.PdfAsException;
import at.gv.egiz.pdfas.api.io.DataSource;
import at.gv.egiz.pdfas.api.sign.SignParameters;
import at.gv.egiz.pdfas.api.sign.SignResult;
+import at.gv.egiz.pdfas.api.timestamp.DummyTimeStamper;
import at.gv.egiz.pdfas.io.FileBasedDataSink;
import at.gv.egiz.pdfas.io.FileBasedDataSource;
@@ -55,10 +56,20 @@ public class SignatureCreationDemo {
SignParameters signParameters = new SignParameters();
signParameters.setDocument(dataSource);
signParameters.setOutput(dataSink);
- signParameters.setSignatureType(Constants.SIGNATURE_TYPE_BINARY);
signParameters.setSignatureDevice(Constants.SIGNATURE_DEVICE_MOA);
- signParameters.setSignatureProfileId("SIGNATURBLOCK_DE");
signParameters.setSignaturePositioning(null);
+ // standard signature
+ signParameters.setSignatureType(Constants.SIGNATURE_TYPE_TEXTUAL);
+ signParameters.setSignatureProfileId("SIGNATURBLOCK_DE");
+
+ // --- enable in case of BAIK SIGNATURE ---
+ /*
+ signParameters.setSignatureType(Constants.SIGNATURE_TYPE_BINARY);
+ // signParameters.setSignatureProfileId("BAIK_URKUNDE_SIGNATUR");
+ signParameters.setSignatureProfileId("BAIK_ARCHIV_SIGNATUR");
+ // use BAIK TimeStamp
+ signParameters.setTimeStamperImpl(new DummyTimeStamper());
+ */
// sign
System.out.println("Signing...");