From 2b313d6009275f39a3d2783269ef0a49ef38c0c4 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 25 Feb 2014 10:49:49 +0100 Subject: Fixing Bug, hidding Incremental update with referencing SigDict in update trailer --- .../pdfas/impl/vfilter/helper/VerificationFilterHelper.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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()) -- cgit v1.2.3