summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-08-12 11:34:10 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-08-12 11:34:10 +0200
commit0299e07ba9b8fa634aba2be3cb0589b42eea3b09 (patch)
tree6574822d16f93dda7b5ec245278bce6f814b686f
parentcc90fdae62ed312a0328f12e48a285ca84d46016 (diff)
downloadpdf-over-0299e07ba9b8fa634aba2be3cb0589b42eea3b09.tar.gz
pdf-over-0299e07ba9b8fa634aba2be3cb0589b42eea3b09.tar.bz2
pdf-over-0299e07ba9b8fa634aba2be3cb0589b42eea3b09.zip
cap rendering size for target logo in previews
(workaround cf. #117)
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java2
2 files changed, 2 insertions, 2 deletions
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(