From 6210beeaa4e1dc63f8f3c897c84b734c77f0301c Mon Sep 17 00:00:00 2001 From: ferbas Date: Tue, 5 Jan 2010 14:25:48 +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@527 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java b/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java index 15c18a1..ed673ac 100644 --- a/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java +++ b/src/main/java/at/gv/egiz/pdfas/impl/signator/textual/TextualSignator_1_0_0.java @@ -105,7 +105,7 @@ public class TextualSignator_1_0_0 implements Signator tsi.profile = profile; tsi.pos = pos; - String document_text = PdfAS.extractNormalizedTextTextual(pdfDataSource); + String document_text = PdfAS.extractNormalizedTextTextual(pdfDataSource, this.getEncoding()); tsi.setNonTextualObjects(ObjectExtractor.extractNonTextInfo(pdfDataSource)); // logger_.debug("signed_text = " + document_text); @@ -162,4 +162,9 @@ public class TextualSignator_1_0_0 implements Signator // } } + public String getEncoding() { + // old signatures used this encoding implicit most of the time (windows default) + return "cp1252"; + } + } -- cgit v1.2.3