From 23dded71da5ab965f8d11b8673fcdf0edef00bd3 Mon Sep 17 00:00:00 2001 From: ferbas Date: Tue, 5 Jan 2010 14:39:18 +0000 Subject: added text sig version 1.2.0 fixed text extraction encoding bug git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@531 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/knowcenter/wag/egov/egiz/PdfASID.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/at/knowcenter') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfASID.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfASID.java index cfa9636..7e4b9c0 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfASID.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfASID.java @@ -21,6 +21,7 @@ import java.io.Serializable; import at.gv.egiz.pdfas.exceptions.ErrorCode; import at.knowcenter.wag.egov.egiz.exceptions.InvalidIDException; +import at.knowcenter.wag.egov.egiz.framework.SignatorFactory; /** * This class encapsulates the Pdf-AS ID ("Kennzeichnung") urn. @@ -200,5 +201,14 @@ public class PdfASID implements Serializable { return URN + SPLIT_STRING + NAMESPACE + SPLIT_STRING + this.vendor + SPLIT_STRING + this.type + SPLIT_STRING + this.version; } + + /** + * Returns if it is an old textual signature (pre 1.2.0) that used cp1252 encoding for text extraction (mostly) + * @return + */ + public boolean isOldCp1252Version() { + return this.getVersion().equals(SignatorFactory.VERSION_1_0_0) + || this.getVersion().equals(SignatorFactory.VERSION_1_1_0); + } } -- cgit v1.2.3