From 23c683430e9f3c5ad21df2ca04f735952e48bce4 Mon Sep 17 00:00:00 2001 From: knowcenter Date: Wed, 14 Mar 2007 13:33:24 +0000 Subject: if pagenumber in pos param is greater than number of pages in document treat it like p:'new' git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@57 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java index c0801bb..313a11c 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java @@ -1051,16 +1051,21 @@ public abstract class PdfAS //get pages of currentdocument int doc_pages = reader.getNumberOfPages(); int page = doc_pages; + boolean make_new_page = pos.isNewPage(); if(!(pos.isNewPage() || pos.isPauto())) { //we should posit signaturtable on this page + page = pos.getPage(); + //System.out.println("XXXXPAGE="+page+" doc_pages="+doc_pages); if (page > doc_pages) { - throw new PDFDocumentException(227, "Page number is to big(=" + page+ ") cannot be parsed."); + make_new_page = true; + page = doc_pages; + //throw new PDFDocumentException(227, "Page number is to big(=" + page+ ") cannot be parsed."); } } - boolean make_new_page = pos.isNewPage(); + //getPagedimensions Rectangle psize = reader.getPageSizeWithRotation(page); int page_rotation = reader.getPageRotation(page); -- cgit v1.2.3