From 78f2fe168d7258af1e40509105ba4ed495606a4e Mon Sep 17 00:00:00 2001 From: Christian Maierhofer Date: Tue, 21 Apr 2015 14:17:56 +0200 Subject: automatic positioning set max_char_pos to effective page height if the last last character on page already reaches the footer, so that a new page is created for the signature block --- .../src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pdf-as-pdfbox') diff --git a/pdf-as-pdfbox/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java b/pdf-as-pdfbox/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java index fab63e2f..a7aaf2df 100644 --- a/pdf-as-pdfbox/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java +++ b/pdf-as-pdfbox/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java @@ -329,10 +329,8 @@ public class PDFPage extends PDFTextStripper { current_y = text.getY(); } - if (current_y > this.effectivePageHeight) { - // logger_.debug("character is below footer_line. footer_line = " + - // this.footer_line + ", text.character=" + character + ", y=" + - // current_y); + if (current_y > this.effectivePageHeight) { + this.max_character_ypos=this.effectivePageHeight; return; } -- cgit v1.2.3