aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-pdfbox')
-rw-r--r--pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/pdfbox/PDFBOXVerifier.java4
-rw-r--r--pdf-as-pdfbox/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java7
2 files changed, 8 insertions, 3 deletions
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/pdfbox/PDFBOXVerifier.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/pdfbox/PDFBOXVerifier.java
index 85ff2d87..4d0c3cbb 100644
--- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/pdfbox/PDFBOXVerifier.java
+++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/pdfbox/PDFBOXVerifier.java
@@ -153,10 +153,10 @@ public class PDFBOXVerifier implements VerifyBackend {
}
return result;
} catch (IOException e) {
- logger.error("Failed to verify document", e);
+ logger.warn("Failed to verify document", e);
throw ErrorExtractor.searchPdfAsError(e, null);
} catch (PdfAsException e) {
- logger.error("Failed to verify document", e);
+ logger.warn("Failed to verify document", e);
throw ErrorExtractor.searchPdfAsError(e, null);
} finally {
if (doc != null) {
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()) {