summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java3
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java8
2 files changed, 7 insertions, 4 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
index 87ec0c42..bad000ea 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
@@ -513,6 +513,9 @@ public class SignaturePanel extends JPanel {
*/
boolean isOnSignature(int x, int y)
{
+ if (this.sigScreenPos == null)
+ return false;
+
Rectangle2D sig = new Rectangle2D.Double(
this.sigScreenPos.getX() + this.offX,
this.sigScreenPos.getY() + this.offY,
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 febf392a..e3ab559c 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
@@ -110,8 +110,9 @@ public class PositioningState extends State {
PdfAs4SignatureParameter param = new PdfAs4SignatureParameter();
param.signatureProfile = config.getSignatureProfile();
- Emblem emblem = new Emblem(config.getDefaultEmblemPath());
- param.emblem = emblem;
+ String emblemPath = config.getDefaultEmblemPath();
+ if (emblemPath != null && !emblemPath.trim().isEmpty())
+ param.emblem = new Emblem(emblemPath);
if (config.getSignatureNote() != null && !config.getSignatureNote().isEmpty())
param.signatureNote = config.getSignatureNote();
@@ -120,8 +121,7 @@ public class PositioningState extends State {
param.targetLogoSize = Math.min(120.0, config.getLogoOnlyTargetSize()); // TODO WORKAROUND FOR #117
PdfAs4SignaturePlaceholder.For(param, (p) -> {
- this.positionComposite.setPlaceholder(
- p.getAWTImage());
+ this.positionComposite.setPlaceholder(p.getAWTImage());
});
if (this.previousPosition != null && !this.previousPosition.useAutoPositioning())