From 0299e07ba9b8fa634aba2be3cb0589b42eea3b09 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Fri, 12 Aug 2022 11:34:10 +0200 Subject: cap rendering size for target logo in previews (workaround cf. #117) --- .../gui/composites/configuration/SimpleConfigurationComposite.java | 2 +- .../main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java index 237da062..eee88533 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java @@ -472,7 +472,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { param.signatureLanguage = this.configurationContainer.signatureLocale.getLanguage(); param.enablePDFACompat = this.configurationContainer.signaturePDFACompat; - param.targetLogoSize = this.configurationContainer.logoOnlyTargetSize; + param.targetLogoSize = Math.min(120.0, this.configurationContainer.logoOnlyTargetSize); // TODO WORKAROUND FOR #117 String image = this.configurationContainer.getEmblemPath(); if (image != null && !image.trim().isEmpty()) { param.emblem = new Emblem(image); 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 2ffb7404..febf392a 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 @@ -117,7 +117,7 @@ public class PositioningState extends State { param.signatureLanguage = config.getSignatureLocale().getLanguage(); param.enablePDFACompat = config.getSignaturePdfACompat(); - param.targetLogoSize = config.getLogoOnlyTargetSize(); + param.targetLogoSize = Math.min(120.0, config.getLogoOnlyTargetSize()); // TODO WORKAROUND FOR #117 PdfAs4SignaturePlaceholder.For(param, (p) -> { this.positionComposite.setPlaceholder( -- cgit v1.2.3