aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag
diff options
context:
space:
mode:
authorrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-08-30 12:43:44 +0000
committerrpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2011-08-30 12:43:44 +0000
commite45125d5f3bab6eb2dbbb581ad7bac9c317ca10f (patch)
treedbcf039156dff670e4d384eb4450e04eee56f729 /src/main/java/at/knowcenter/wag
parentf51afc6fc634d9640d7bbbee333ca32b3d80e579 (diff)
downloadpdf-as-3-e45125d5f3bab6eb2dbbb581ad7bac9c317ca10f.tar.gz
pdf-as-3-e45125d5f3bab6eb2dbbb581ad7bac9c317ca10f.tar.bz2
pdf-as-3-e45125d5f3bab6eb2dbbb581ad7bac9c317ca10f.zip
Correction to not create a new page, as it is done when signature block hasn't enough place, when signature block is invisible
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@797 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/BinarySignator_1_0_0.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/BinarySignator_1_0_0.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/BinarySignator_1_0_0.java
index 49e2858..46245d2 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/BinarySignator_1_0_0.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/signators/BinarySignator_1_0_0.java
@@ -131,6 +131,18 @@ public class BinarySignator_1_0_0 implements Signator
variable_field_definitions.add(sfd);
}
}
+
+ //check if signature block is invisible, and if so and if also signature block is positioned
+ //on a new page, prevent pdf-as to do that, because why should make a new page just for an invisible block
+ //added by rpiazzi
+ if (signature_object.getSignatureTypeDefinition().getInvisibleFieldDefinitions().size()==SignatureTypes.REQUIRED_SIG_KEYS.length) {
+ if (pi.isMakeNewPage()) {
+ int pageNumber = pi.getPage();
+ pi = new PositioningInstruction(false, pageNumber-1, 0, 0);
+ }
+ }
+ //end added
+
IncrementalUpdateInformation iui = IncrementalUpdateHelper.writeIncrementalUpdate(pdf, pdf_table, signature_type, pi, variable_field_definitions, all_field_definitions, null, null, null);
String temp_string = iui.temp_ir_number + " " + iui.temp_ir_generation + " obj"; //$NON-NLS-1$//$NON-NLS-2$