From 2b70ab18a97dd248d478d985ae602bd7e3a9d320 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 28 Nov 2014 11:04:46 +0100 Subject: Logging Error Levels adapted --- .../src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pdf-as-pdfbox/src/main/java/at/knowcenter/wag') 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 84574b41..5a3711a4 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 @@ -234,7 +234,12 @@ public class PDFPage extends PDFTextStripper { // this depicts the current end of path-related page content float lowerBoundYPositionFromTop; - PDRectangle boundaryBox = this.getCurrentPage().findMediaBox(); + PDRectangle boundaryBox = this.getCurrentPage().findCropBox(); + + if(boundaryBox == null) { + boundaryBox = this.getCurrentPage().findMediaBox(); + } + float pageHeight; switch (this.getCurrentPage().findRotation()) { -- cgit v1.2.3