From 79e0ad14f12bf4a3b46e9bb1cdd4f152c9274a43 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 20 Sep 2023 08:40:19 +0200 Subject: fix(positioning): remove old code that prohibits newPage on already signed documents in combination with forceNewPage flag --- .../egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib') diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java index 70d9044b..d1d097aa 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java +++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java @@ -116,13 +116,7 @@ public class Positioning { make_new_page = checkIfNewPageIsAllowed(make_new_page, numberOfExistingSignatures, settings, profilConfig); - - if(make_new_page && numberOfExistingSignatures!=0) { - make_new_page = false; - - } - - + final PDPage pdPage = pdfDataSource.getPage(page - 1); PDRectangle cropBox = pdPage.getCropBox(); @@ -256,7 +250,7 @@ public class Positioning { private static boolean checkIfNewPageIsAllowed(boolean make_new_page, long numberOfExistingSignatures, ISettings settings, SignatureProfileSettings profilConfig) throws PdfAsException { - if(make_new_page && numberOfExistingSignatures!=0) { + if(make_new_page && numberOfExistingSignatures !=0 ) { log.debug("Signature-block would be need a new page, but new pages are not allowed on already signed documents."); if (isNewPageOnSignedDocumentsEnabled(profilConfig)) { log.info("New pages not allowed on already signed documents, but force new page by configuration"); -- cgit v1.2.3