From 42fde29384da03043bcf7710b4983fa4f5836ae8 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Mon, 23 Nov 2020 16:02:25 +0100 Subject: change in profile setting --- .../at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 7 +++++-- .../src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'pdf-over-signer') 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()); -- cgit v1.2.3