diff options
author | Emina Ahmetovic <emina.ahmetovic@egiz.gv.at> | 2020-12-18 11:24:22 +0100 |
---|---|---|
committer | Emina Ahmetovic <emina.ahmetovic@egiz.gv.at> | 2020-12-18 11:24:22 +0100 |
commit | 78a01744e1fc3e8d45348b623a3a80906d31e373 (patch) | |
tree | cea98ff34a26b15534d52c0108546282cadbdcd1 | |
parent | 23a0c0bfd0054e4dc1a461a2eda76d7fb1f61fb9 (diff) | |
download | pdf-as-4-78a01744e1fc3e8d45348b623a3a80906d31e373.tar.gz pdf-as-4-78a01744e1fc3e8d45348b623a3a80906d31e373.tar.bz2 pdf-as-4-78a01744e1fc3e8d45348b623a3a80906d31e373.zip |
clear placeholders, add additional parameters in a default config
5 files changed, 11 insertions, 3 deletions
diff --git a/pdf-as-lib/src/main/resources/config/config.zip b/pdf-as-lib/src/main/resources/config/config.zip Binary files differindex f3b895a9..48cc94fd 100644 --- a/pdf-as-lib/src/main/resources/config/config.zip +++ b/pdf-as-lib/src/main/resources/config/config.zip diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignaturePlaceholderExtractor.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignaturePlaceholderExtractor.java index f1aa78b6..9043aae7 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignaturePlaceholderExtractor.java +++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignaturePlaceholderExtractor.java @@ -128,10 +128,13 @@ public class SignaturePlaceholderExtractor extends PDFStreamEngine implements Pl this.doc = doc; } - //todo lists returns duplicates - public static List<SignaturePlaceholderData> listPlaceholders() { + public static List<SignaturePlaceholderData> listPlaceholders() { return placeholders; } + + public static void clearPlaceholders(){ + placeholders.clear(); + } /** * Search the document for placeholder images and possibly included * additional info.<br/> diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java index 8f67c96b..82c48d96 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java +++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java @@ -157,6 +157,9 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { //gives a list of all placeholders List<SignaturePlaceholderData> placeholders = SignaturePlaceholderExtractor.listPlaceholders(); + if(placeholders!=null){ + SignaturePlaceholderExtractor.clearPlaceholders(); + } if(placeholder_id.equalsIgnoreCase("")){ if(checkAvailablePlaceholders(placeholders,existingSignatureLocations(doc))!=null) { diff --git a/pdf-as-web/src/main/configuration/pdf-as-web.properties b/pdf-as-web/src/main/configuration/pdf-as-web.properties index 4cc59a47..556fd667 100644 --- a/pdf-as-web/src/main/configuration/pdf-as-web.properties +++ b/pdf-as-web/src/main/configuration/pdf-as-web.properties @@ -11,6 +11,9 @@ bku.mobile.url=https://www.handy-signatur.at/mobile/https-security-layer-request # use with care! allow.ext.overwrite=false +#mobile.sign.enabled = true +#bku.sign.enabled =true + # White list entries for properties, that can be overwritten, # by external components ext.overwrite.wl.1=^$ diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java index ba1481f9..8fe679f2 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java @@ -348,7 +348,6 @@ public class ExternSignServlet extends HttpServlet { } else { PlaceholderWebConfiguration.clear(); - } |