aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-03-14 13:33:24 +0000
committerknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-03-14 13:33:24 +0000
commit23c683430e9f3c5ad21df2ca04f735952e48bce4 (patch)
treefbc050e3b0049b1dc9eb6ec504529e5974abadb9 /src
parent2ffb0b3262437ebb8f762489a236f9e40d87b200 (diff)
downloadpdf-as-3-23c683430e9f3c5ad21df2ca04f735952e48bce4.tar.gz
pdf-as-3-23c683430e9f3c5ad21df2ca04f735952e48bce4.tar.bz2
pdf-as-3-23c683430e9f3c5ad21df2ca04f735952e48bce4.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java9
1 files changed, 7 insertions, 2 deletions
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);