From 2e94ff4058d7c1717ca3f3cff1730b2326a0f8fc Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 3 Mar 2016 11:38:30 +0100 Subject: fixed minimum placeholder size --- .../egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas') diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java index 3e9fa702..97faf102 100644 --- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java +++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java @@ -35,6 +35,7 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.Calendar; import java.util.List; +import java.util.UUID; import org.apache.commons.io.IOUtils; import org.apache.pdfbox.cos.COSArray; @@ -168,11 +169,12 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { float minWidth = signatureProfileConfiguration.getMinWidth(); - if (tablePos.getWidth() < minWidth) { - tablePos.width = minWidth; - logger.debug("Correcting placeholder with to minimum width {}", minWidth); + if(minWidth > 0) { + if (tablePos.getWidth() < minWidth) { + tablePos.width = minWidth; + logger.debug("Correcting placeholder with to minimum width {}", minWidth); + } } - logger.debug("Placeholder Position set to: " + tablePos.toString()); } } @@ -389,6 +391,7 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { } options.setPage(positioningInstruction.getPage()); + options.setVisualSignature(properties.getVisibleSignature()); } -- cgit v1.2.3