summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java4
2 files changed, 15 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
index 4e18cd52..26f67da3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
@@ -663,8 +663,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
try {
if (this.signer != null) {
- SignatureParameter param = this.signer.getPDFSigner()
- .newParameter();
+ SignatureParameter param = this.signer.getPDFSigner().newParameter();
if(this.configurationContainer.getSignatureNote() != null && !this.configurationContainer.getSignatureNote().isEmpty()) {
param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote()); //$NON-NLS-1$
}
@@ -762,6 +761,16 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.cmbSingatureProfiles.select(selected.ordinal());
}
+ void setSignatureProfileSetting(){
+ try {
+ SignatureParameter param = this.signer.getPDFSigner().newParameter();
+ param.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName());
+
+ } catch (Exception e){
+ log.debug("Cannot save siganture profile" + e.getMessage());
+ }
+ }
+
/*
* (non-Javadoc)
*
@@ -771,6 +780,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
@Override
protected void signerChanged() {
this.setVisibleImage();
+ this.setSignatureProfileSetting();
}
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index f9827ba4..9d17a3e8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
@@ -166,6 +166,8 @@ public class PrepareSigningState extends State {
this.state.signatureParameter
.setSignaturePdfACompat(configuration.getSignaturePdfACompat());
+ this.state.signatureParameter.setSignatureProfile(configuration.getSignatureProfile());
+
this.state.signingState = this.state.signer
.prepare(this.state.signatureParameter);
@@ -199,7 +201,7 @@ public class PrepareSigningState extends State {
at.asit.pdfover.signator.SigningState signingState = null;
- Signer signer;
+ Signer signer;
Exception threadException = null;