diff options
author | Thomas <> | 2023-04-18 20:16:31 +0200 |
---|---|---|
committer | Thomas <> | 2023-04-18 20:16:31 +0200 |
commit | 8525e93330ed046bec63daedbeba732416970121 (patch) | |
tree | a52a3abca6f01df15649deae3061e6c04d0ec0df /pdf-as-pdfbox-2 | |
parent | e08d1cba3bcc519dbc757c119bfd299f7903922c (diff) | |
download | pdf-as-4-8525e93330ed046bec63daedbeba732416970121.tar.gz pdf-as-4-8525e93330ed046bec63daedbeba732416970121.tar.bz2 pdf-as-4-8525e93330ed046bec63daedbeba732416970121.zip |
chore(pos): change order of configuration check for 'less space'
check profile specific configuration first and 'failOnLessSpace' afterwards
Diffstat (limited to 'pdf-as-pdfbox-2')
-rw-r--r-- | pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java | 8 |
1 files changed, 4 insertions, 4 deletions
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 f942d77e..31de6446 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 @@ -259,13 +259,13 @@ public class Positioning { SignatureProfileSettings profilConfig) throws PdfAsException { 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 (isFailOnLessSpaceEnabled(settings)) { - throw new PdfAsException("error.pdf.stamp.12"); - - } else if (isNewPageOnSignedDocumentsEnabled(profilConfig)) { + if (isNewPageOnSignedDocumentsEnabled(profilConfig)) { log.info("New pages not allowed on already signed documents, but force new page by configuration"); return make_new_page; + } else if (isFailOnLessSpaceEnabled(settings)) { + throw new PdfAsException("error.pdf.stamp.12"); + } else { log.info("Placing signature-block on last page without free-space checks ... "); return false; |