From b34cefbc33a3afc26dece74ea8bc42c5054efd5b Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 17 Nov 2022 12:19:04 +0100 Subject: handle invisible profile signature previews better --- .../java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java') diff --git a/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java index 0229acb6..ee8c2741 100644 --- a/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java +++ b/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java @@ -126,7 +126,7 @@ public class PdfAs4SignatureParameter { Image placeholder = pdfas.generateVisibleSignaturePreview(param, cert, 72 * 4); // WORKAROUND for #110, manually paint a black border - if (!this.signatureProfile.equals(Profile.BASE_LOGO)) + if ((placeholder != null) && !this.signatureProfile.equals(Profile.BASE_LOGO)) { Graphics2D ctx = (Graphics2D)placeholder.getGraphics(); ctx.setColor(Color.BLACK); -- cgit v1.2.3