From 5b455cba0b88255f58d1f9e00ab41770678b8828 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 12 Aug 2014 11:29:51 +0200 Subject: Fixed PDF automatic positioning --- pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pdf-as-lib/src/main/java') diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java index 6911c698..84574b41 100644 --- a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java +++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java @@ -56,7 +56,6 @@ import java.util.Map; import org.apache.commons.lang3.math.NumberUtils; import org.apache.pdfbox.cos.COSBase; -import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSStream; import org.apache.pdfbox.pdmodel.PDPage; @@ -335,7 +334,8 @@ public class PDFPage extends PDFTextStripper { } // store ypos of the char if it is not empty - if (!character.equals(" ") && current_y > this.max_character_ypos) { + if (!at.gv.egiz.pdfas.common.utils.StringUtils.whiteSpaceTrim(character).isEmpty() && + current_y > this.max_character_ypos) { this.max_character_ypos = current_y; } -- cgit v1.2.3