aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/placeholder/SignaturePlaceholderExtractor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/placeholder/SignaturePlaceholderExtractor.java b/src/main/java/at/gv/egiz/pdfas/placeholder/SignaturePlaceholderExtractor.java
index b33c7f3..76a4dec 100644
--- a/src/main/java/at/gv/egiz/pdfas/placeholder/SignaturePlaceholderExtractor.java
+++ b/src/main/java/at/gv/egiz/pdfas/placeholder/SignaturePlaceholderExtractor.java
@@ -117,8 +117,13 @@ public class SignaturePlaceholderExtractor extends PDFStreamEngine {
SignaturePlaceholderContext.setSignaturePlaceholderData(ret);
return ret;
}
+ // no placeholders found, apply strict mode if set
+ if (matchMode == Constants.PLACEHOLDER_MATCH_MODE_STRICT) {
+ throw new PlaceholderExtractionException(ErrorCode.SIGNATURE_PLACEHOLDER_EXTRACTION_FAILED, "no suitable placeholder found and STRICT matching mode requested.");
+ }
+
return null;
- }finally{
+ } finally {
if (doc != null)
try {
doc.close();