summaryrefslogtreecommitdiff
path: root/pdf-over-signer/pdf-over-sigpdfas4/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-signer/pdf-over-sigpdfas4/src')
-rw-r--r--pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java7
-rw-r--r--pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java
index 08722617..0117b8d3 100644
--- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java
+++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java
@@ -69,7 +69,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter {
**/
static final Logger log = LoggerFactory
.getLogger(PdfAs4SignatureParameter.class);
- private String profile;
+ private String profile = null;
/* (non-Javadoc)
* @see at.asit.pdfover.signator.SignatureParameter#getPlaceholderDimension()
@@ -175,7 +175,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter {
return Profile.INVISIBLE.name();
}
- switch (Profile.getProfile(this.profile)){
+ switch (Profile.getProfile(getProfileName())){
case BASE_LOGO:
case INVISIBLE:
return getProfileName();
@@ -202,6 +202,9 @@ public class PdfAs4SignatureParameter extends SignatureParameter {
}
private String getProfileName(){
+ if (this.profile == null){
+ this.profile = Profile.SIGNATURBLOCK_SMALL.name();
+ }
return Profile.getProfile(this.profile).name();
}
diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
index a1934cb2..1b045c64 100644
--- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
+++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
@@ -147,7 +147,7 @@ public class PdfAs4Signer implements Signer {
sp = new SignaturePosition();
else if (tp.isPauto())
sp = new SignaturePosition(tp.getPosX(), tp.getPosY());
- else if (param.getSignatureProfileId().contains(Profile.AMTSSIGNATURBLOCK.getName()))
+ else if (param.getSignatureProfileId().contains(Profile.AMTSSIGNATURBLOCK.name()))
sp = new SignaturePosition();
else
sp = new SignaturePosition(tp.getPosX(), tp.getPosY(), tp.getPage());