From daeec3d00467067887a9c606efa7495f163c8f0a Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Wed, 3 Aug 2022 15:16:51 +0200 Subject: correct signature profile in positioning placeholder --- .../at/asit/pdfover/gui/workflow/states/PositioningState.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 3bcf18bc..15a67876 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -103,9 +103,12 @@ public class PositioningState extends State { log.debug("Displaying " + stateMachine.status.document); this.positionComposite.displayDocument(document); } - // Update possibly changed values + ConfigurationManager config = stateMachine.configProvider; - PdfAs4SignatureParameter param = new PdfAs4SignatureParameter(); // TODO: these don't actually reflect the chosen settings + + PdfAs4SignatureParameter param = new PdfAs4SignatureParameter(); + param.signatureProfileName = config.getSignatureProfile(); + Emblem emblem = new Emblem(config.getDefaultEmblemPath()); param.emblem = emblem; if(config.getSignatureNote() != null && !config.getSignatureNote().isEmpty()) { @@ -118,11 +121,14 @@ public class PositioningState extends State { this.positionComposite.setPlaceholder( param.getPlaceholder(), config.getPlaceholderTransparency()); + if (this.previousPosition != null && !this.previousPosition.useAutoPositioning()) + { this.positionComposite.setPosition( this.previousPosition.getX(), this.previousPosition.getY(), this.previousPosition.getPage()); + } return this.positionComposite; } -- cgit v1.2.3