aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox/src/main/java/at/knowcenter/wag
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-05-06 13:12:27 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-05-06 13:12:27 +0200
commitd389d024c2e4c6922e8f44af40be32218244887f (patch)
treef7aa41ae74db9b518136c50b8e59ea02b0bc14d7 /pdf-as-pdfbox/src/main/java/at/knowcenter/wag
parentec4490769f0fc9c1562688b2393e97885f39a04b (diff)
parentea72400ae232d20c76ddd2be91f39a1bbbdb4e71 (diff)
downloadpdf-as-4-d389d024c2e4c6922e8f44af40be32218244887f.tar.gz
pdf-as-4-d389d024c2e4c6922e8f44af40be32218244887f.tar.bz2
pdf-as-4-d389d024c2e4c6922e8f44af40be32218244887f.zip
merge PDFUA
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/knowcenter/wag')
-rw-r--r--pdf-as-pdfbox/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFPage.java26
1 files changed, 10 insertions, 16 deletions
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 5a3711a4..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
@@ -320,21 +320,17 @@ public class PDFPage extends PDFTextStripper {
current_y = text.getY();
}
if (pageRotation == 90) {
- current_y = text.getX();
+ current_y = text.getY();
}
if (pageRotation == 180) {
- float page_height = this.getCurrentPage().findMediaBox().getHeight();
- current_y = page_height - text.getY();
+ current_y = text.getY();
}
if (pageRotation == 270) {
- float page_height = this.getCurrentPage().findMediaBox().getHeight();
- current_y = page_height - text.getX();
+ 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;
}
@@ -454,10 +450,8 @@ public class PDFPage extends PDFTextStripper {
if (pageRotation == 180) {
float min_y = findMinY(transformed_coordinates);
logger.debug("min_y = " + min_y);
- float page_height = this.mypage.getCurrentPage().findMediaBox().getHeight();
- actual_lowest_point = page_height
- - findMaxY(transformed_coordinates);
- actual_starting_point = page_height - min_y;
+ actual_lowest_point = findMaxY(transformed_coordinates);
+ actual_starting_point = actual_lowest_point + min_y;
}
if (pageRotation == 270) {
float min_x = findMinX(transformed_coordinates);
@@ -581,14 +575,14 @@ public class PDFPage extends PDFTextStripper {
current_y = page_height - anno.getRectangle().getLowerLeftY();
}
if (pageRotation == 90) {
- current_y = anno.getRectangle().getLowerLeftX();
+ current_y = anno.getRectangle().getUpperRightX();
}
if (pageRotation == 180) {
current_y = anno.getRectangle().getUpperRightY();
}
if (pageRotation == 270) {
- float page_height = page.findMediaBox().getHeight();
- current_y = page_height - anno.getRectangle().getUpperRightX();
+ float page_width = page.findMediaBox().getWidth();
+ current_y = page_width - anno.getRectangle().getLowerLeftX() ;
}
if (current_y > this.effectivePageHeight) {