aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-pdfbox/src')
-rw-r--r--pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/placeholder/SignaturePlaceholderExtractor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/placeholder/SignaturePlaceholderExtractor.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/placeholder/SignaturePlaceholderExtractor.java
index 7990a094..9d2f7717 100644
--- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/placeholder/SignaturePlaceholderExtractor.java
+++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/placeholder/SignaturePlaceholderExtractor.java
@@ -147,8 +147,11 @@ public class SignaturePlaceholderExtractor extends PDFStreamEngine {
PDPage page = (PDPage) iter.next();
try {
extractor.setCurrentPage(pageNr);
- extractor.processStream(page, page.findResources(), page
+ if(page.getContents() != null && page.findResources() != null &&
+ page.getContents().getStream() != null) {
+ extractor.processStream(page, page.findResources(), page
.getContents().getStream());
+ }
SignaturePlaceholderData ret = matchPlaceholderPage(
extractor.placeholders, placeholderId, matchMode);
if (ret != null) {
@@ -158,6 +161,8 @@ public class SignaturePlaceholderExtractor extends PDFStreamEngine {
}
} catch (IOException e1) {
throw new PDFIOException("error.pdf.io.04", e1);
+ } catch(Throwable e) {
+ throw new PDFIOException("error.pdf.io.04", e);
}
}