aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-01-11 10:58:48 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-01-11 10:58:48 +0000
commit4ce2fbc415f2fae57842b2e13a0817bb63594434 (patch)
tree709565a905002f7d02f474d46ce7bf548b3e6fc8 /src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java
parent511fcf7604d754475860a85834af43eecc44d61f (diff)
downloadpdf-as-3-4ce2fbc415f2fae57842b2e13a0817bb63594434.tar.gz
pdf-as-3-4ce2fbc415f2fae57842b2e13a0817bb63594434.tar.bz2
pdf-as-3-4ce2fbc415f2fae57842b2e13a0817bb63594434.zip
- check implemented: responses are validated upon valid SL content (ErrorResponse, Create|VerifyXMLSignatureResponse) (ErrorCode 340)
- new errorcode added (340: unable to receive suitable response) - default signature validation links changed (-> http://www.signaturpruefung.gv.at) - recognition of non-textual objects: static switch implemented allowing to configure behaviour (at compile time) in case of signatures (default behaviour: skip detection of all signatures as non-textual objects) - minor bug fixed: invalid evaluation of response charset resulting in invalid warn debug message - configuration updated - Default configuration updated git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@542 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java
index cd6d449..4516b6b 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/ObjectExtractor.java
@@ -26,6 +26,12 @@ import at.gv.egiz.pdfas.framework.input.PdfDataSource;
*/
public class ObjectExtractor {
private static Logger log = Logger.getLogger(ObjectExtractor.class);
+
+ /*
+ * If set <code>true</code> signature annotations are not extracted otherwise
+ * all signatures except PDF-AS signatures are extracted.
+ */
+ private final static boolean SKIP_SIGNATURES = true;
/**
* Find annotation objects in pdf documents
@@ -50,10 +56,15 @@ public class ObjectExtractor {
}
String ft = anno.getDictionary().getNameAsString("FT");
if (ft != null && ft.equals("Sig")) { // skip signature widgets
- COSDictionary sigDict = (COSDictionary) anno.getDictionary().getDictionaryObject("V");
- if (sigDict != null && AdobeSignatureHelper.ADOBE_SIG_FILTER.equals(sigDict.getNameAsString("Filter"))) {
- log.debug("found PDF-AS signature widged, skip further extraction");
+ if (SKIP_SIGNATURES) {
+ log.debug("found signature widged, skip extraction");
continue;
+ } else {
+ COSDictionary sigDict = (COSDictionary) anno.getDictionary().getDictionaryObject("V");
+ if (sigDict != null && AdobeSignatureHelper.ADOBE_SIG_FILTER.equals(sigDict.getNameAsString("Filter"))) {
+ log.debug("found PDF-AS signature widged, skip extraction");
+ continue;
+ }
}
}
NonTextObjectInfo objInfo = new NonTextObjectInfo();