diff options
Diffstat (limited to 'pdf-as-lib/src')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/impl/vfilter/helper/VerificationFilterHelper.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/impl/vfilter/helper/VerificationFilterHelper.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/impl/vfilter/helper/VerificationFilterHelper.java index 69803e7..ea4cbd4 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/impl/vfilter/helper/VerificationFilterHelper.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/impl/vfilter/helper/VerificationFilterHelper.java @@ -33,6 +33,8 @@ import at.gv.egiz.pdfas.impl.vfilter.Partition; import at.gv.egiz.pdfas.impl.vfilter.partition.BinaryPartition;
import at.gv.egiz.pdfas.impl.vfilter.partition.TextPartition;
import at.gv.egiz.pdfas.framework.input.PdfDataSource;
+import at.knowcenter.wag.egov.egiz.exceptions.InvalidIDException;
+import at.knowcenter.wag.egov.egiz.exceptions.PDFDocumentException;
import at.knowcenter.wag.exactparser.parsing.results.FooterParseResult;
/**
@@ -73,7 +75,15 @@ public final class VerificationFilterHelper FooterParseResult fpr = (FooterParseResult) it.next();
byte[] data = DataSourceHelper.convertDataSourceToByteArray(pdf);
- if (VerificationFilterBinaryHelper.containsEGIZDict(data, fpr))
+ boolean isbinaryPartition = false;
+ try {
+ isbinaryPartition = VerificationFilterBinaryHelper.extractKZFromEGIZBlock(data, fpr) != null;
+ } catch(InvalidIDException e) {
+ isbinaryPartition = false;
+ } catch (PDFDocumentException e) {
+ isbinaryPartition = false;
+ }
+ if (isbinaryPartition)
{
BinaryPartition bp = null;
if (partitions.isEmpty() || ((Partition) partitions.get(partitions.size() - 1)).isTextPartition())
|