aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/gv/egiz')
-rw-r--r--pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/positioning/Positioning.java8
-rw-r--r--pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/positioning/Positioning.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/positioning/Positioning.java
index 7aa3fa71..e2f245a7 100644
--- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/positioning/Positioning.java
+++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox/positioning/Positioning.java
@@ -77,9 +77,9 @@ public class Positioning {
*/
public static PositioningInstruction determineTablePositioning(
TablePos pos, String signature_type, PDDocument pdfDataSource,
- IPDFVisualObject pdf_table, boolean legacy32) throws PdfAsException {
+ IPDFVisualObject pdf_table, boolean legacy32, boolean legacy40) throws PdfAsException {
return adjustSignatureTableandCalculatePosition(pdfDataSource,
- pdf_table, pos, legacy32);
+ pdf_table, pos, legacy32, legacy40);
}
private static PDRectangle rotateBox(PDRectangle cropBox, int rotation) {
@@ -153,7 +153,7 @@ public class Positioning {
*/
public static PositioningInstruction adjustSignatureTableandCalculatePosition(
final PDDocument pdfDataSource, IPDFVisualObject pdf_table,
- TablePos pos, boolean legacy32) throws PdfAsException {
+ TablePos pos, boolean legacy32, boolean legacy40) throws PdfAsException {
PdfBoxUtils.checkPDFPermissions(pdfDataSource);
// get pages of currentdocument
@@ -265,7 +265,7 @@ public class Positioning {
float pre_page_length = PDFUtilities.calculatePageLength(pdfDataSource,
page - 1, page_height - footer_line, /* page_rotation, */
- legacy32);
+ legacy32, legacy40);
if (pre_page_length == Float.NEGATIVE_INFINITY) {
// we do have an empty page or nothing in area above footerline
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java
index 97faf102..6d035b30 100644
--- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java
+++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java
@@ -35,7 +35,6 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
-import java.util.UUID;
import org.apache.commons.io.IOUtils;
import org.apache.pdfbox.cos.COSArray;
@@ -261,6 +260,7 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
}
boolean legacy32Position = signatureProfileConfiguration.getLegacy32Positioning();
+ boolean legacy40Position = signatureProfileConfiguration.getLegacy40Positioning();
// create Table describtion
Table main = TableFactory.createSigTable(signatureProfileSettings, MAIN, pdfObject.getStatus(),
@@ -277,7 +277,7 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
*/
PositioningInstruction positioningInstruction = Positioning.determineTablePositioning(tablePos, "",
- doc, visualObject, legacy32Position);
+ doc, visualObject, legacy32Position, legacy40Position);
logger.debug("Positioning: {}", positioningInstruction.toString());
@@ -722,10 +722,10 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
PositioningInstruction positioningInstruction = null;
if (signaturePosString != null) {
positioningInstruction = Positioning.determineTablePositioning(new TablePos(signaturePosString), "",
- origDoc, visualObject, false);
+ origDoc, visualObject, false, false);
} else {
positioningInstruction = Positioning.determineTablePositioning(new TablePos(), "", origDoc,
- visualObject, false);
+ visualObject, false, false);
}
origDoc.close();