From 25ba9c82234d8392615f96ae47453ee047a4e168 Mon Sep 17 00:00:00 2001 From: knowcenter Date: Tue, 13 Mar 2007 12:51:22 +0000 Subject: 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 --- src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFUtilities.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/knowcenter/wag') 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); } -- cgit v1.2.3