From d642bf1dd6c4a4e53f09b594da4847b08a435184 Mon Sep 17 00:00:00 2001 From: Bianca Schnalzer Date: Mon, 4 Dec 2017 13:18:27 +0100 Subject: Selecting invisible profile via command line --- .../signer/pdfas/PdfAs4SignatureParameter.java | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'pdf-over-signer/pdf-over-sigpdfas4/src/main') diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java index 0403de2f..600a5e75 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java +++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java @@ -48,6 +48,11 @@ public class PdfAs4SignatureParameter extends SignatureParameter { private static final String PROFILE_ID_NOTE = "_NOTE"; /** The profile ID extension for PDF/A compatibility */ private static final String PROFILE_ID_PDFA = "_PDFA"; + + /** + * Visibility of signature block + */ + public static boolean PROFILE_VISIBILITY=true; private HashMap genericProperties = new HashMap(); @@ -155,10 +160,22 @@ public class PdfAs4SignatureParameter extends SignatureParameter { String lang = getSignatureLanguage(); boolean useNote = (getProperty("SIG_NOTE") != null); boolean usePdfACompat = (getSignaturePdfACompat()); - - String profileId = PROFILE_ID_BASE; + + //Add Signature Param here// + String profileId; + + + + if (PROFILE_VISIBILITY) + { + profileId = PROFILE_ID_BASE; profileId += (lang != null && lang.equals("en")) ? - PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; + PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE;} + + else + { + profileId ="INVISIBLE"; + } if (useNote) profileId += PROFILE_ID_NOTE; -- cgit v1.2.3