From 0516022f972d9c0563a7644a172994a79ac4fe9a Mon Sep 17 00:00:00 2001 From: tknall Date: Tue, 1 Feb 2011 09:55:31 +0000 Subject: - Bug fixed (placeholder strict mode was not applied when document does not contain any (valid) placeholder image) - Documentation updated. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@740 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../gv/egiz/pdfas/placeholder/SignaturePlaceholderExtractor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/gv/egiz/pdfas') 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(); -- cgit v1.2.3