From 1fca87878177b28ad0ae1d408275c4eca7a2e772 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Mon, 27 Oct 2014 13:41:05 +0100 Subject: QR Code fix --- .../lib/impl/signing/pdfbox/PADESPDFBOXSigner.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'pdf-as-pdfbox/src/main/java/at') 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 f3b867af..14082a10 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 @@ -131,6 +131,24 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { FileInputStream fis = new FileInputStream(new File(fisTmpFile)); doc = pdfObject.getDocument(); + + SignaturePlaceholderData signaturePlaceholderData = PlaceholderFilter + .checkPlaceholderSignature(pdfObject.getStatus(), + pdfObject.getStatus().getSettings()); + + TablePos tablePos = null; + + if (signaturePlaceholderData != null) { + // Placeholder found! + + if (signaturePlaceholderData.getProfile() != null) { + requestedSignature + .setSignatureProfileID(signaturePlaceholderData + .getProfile()); + } + + tablePos = signaturePlaceholderData.getTablePos(); + } PDSignature signature = new PDSignature(); signature.setFilter(COSName.getPDFName(signer.getPDFFilter())); // default @@ -176,24 +194,6 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { .getStatus().getSignatureProfileConfiguration( requestedSignature.getSignatureProfileID()); - SignaturePlaceholderData signaturePlaceholderData = PlaceholderFilter - .checkPlaceholderSignature(pdfObject.getStatus(), - pdfObject.getStatus().getSettings()); - - TablePos tablePos = null; - - if (signaturePlaceholderData != null) { - // Placeholder found! - - if (signaturePlaceholderData.getProfile() != null) { - requestedSignature - .setSignatureProfileID(signaturePlaceholderData - .getProfile()); - } - - tablePos = signaturePlaceholderData.getTablePos(); - } - if (tablePos == null) { // ================================================================ // PositioningStage (visual) -> find position or use fixed -- cgit v1.2.3