aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-03-13 12:51:22 +0000
committerknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-03-13 12:51:22 +0000
commit25ba9c82234d8392615f96ae47453ee047a4e168 (patch)
tree24f60961c614178711169ceb92bfc2ea1e0bbd4b
parentf0e215a1fb38f637b809be6f8619732e12a18356 (diff)
downloadpdf-as-3-25ba9c82234d8392615f96ae47453ee047a4e168.tar.gz
pdf-as-3-25ba9c82234d8392615f96ae47453ee047a4e168.tar.bz2
pdf-as-3-25ba9c82234d8392615f96ae47453ee047a4e168.zip
minor bugfix -positioning into rotated pages now is handled correctly
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@54 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFUtilities.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFUtilities.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFUtilities.java
index 5384a8c..8c15d21 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFUtilities.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFUtilities.java
@@ -39,7 +39,7 @@ import com.lowagie.text.DocumentException;
*/
public abstract class PDFUtilities
{
- public static float calculatePageLength(final byte[] pdf,int page ,float footer_line) throws PDFDocumentException
+ public static float calculatePageLength(final byte[] pdf,int page ,float footer_line, int pagerotation) throws PDFDocumentException
{
try
{
@@ -54,7 +54,7 @@ public abstract class PDFUtilities
parser.parse();
PDDocument pdfDocument_ = parser.getPDDocument();
- float page_length = calculatePageLength(pdfDocument_,page , footer_line);
+ float page_length = calculatePageLength(pdfDocument_,page , footer_line, pagerotation);
pdfDocument_.close();
return page_length;
}
@@ -67,12 +67,12 @@ public abstract class PDFUtilities
throw new PDFDocumentException(201, e);
}
}
- public static float calculatePageLength(PDDocument document,int page ,float footer_line) throws IOException
+ public static float calculatePageLength(PDDocument document,int page ,float footer_line, int pagerotation) throws IOException
{
//int last_page_id = document.getNumberOfPages();
List allPages = document.getDocumentCatalog().getAllPages();
PDPage pdpage = (PDPage) allPages.get(page);
-
+ pdpage.setRotation(pagerotation);
return calculatePageLength(pdpage, footer_line);
}