From 464c44c367f32f8e7624a6b3ed3474c95a69d6fa Mon Sep 17 00:00:00 2001
From: Christian Maierhofer <cmaierhofer@iaik.tugraz.at>
Date: Wed, 15 Jun 2016 10:40:22 +0200
Subject: removed legacy modes for pdfbox2

---
 .../egiz/pdfas/lib/impl/pdfbox2/positioning/Positioning.java  |  6 +++---
 .../pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java     | 11 ++++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

(limited to 'pdf-as-pdfbox-2/src')

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 4fbedac7..8ed12db8 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
@@ -82,9 +82,9 @@ public class Positioning {
 	 */
 	public static PositioningInstruction determineTablePositioning(
 			TablePos pos, String signature_type, PDDocument pdfDataSource,
-			IPDFVisualObject pdf_table, boolean legacy32, boolean legacy40, ISettings settings) throws PdfAsException {
+			IPDFVisualObject pdf_table, ISettings settings) throws PdfAsException {
 		return adjustSignatureTableandCalculatePosition(pdfDataSource,
-				pdf_table, pos, legacy32, legacy40, settings);
+				pdf_table, pos, settings);
 	}
 
 	private static PDRectangle rotateBox(PDRectangle cropBox, int rotation) {
@@ -159,7 +159,7 @@ public class Positioning {
 	 */
 	public static PositioningInstruction adjustSignatureTableandCalculatePosition(
 			final PDDocument pdfDataSource, IPDFVisualObject pdf_table,
-			TablePos pos, boolean legacy32, boolean legacy40, ISettings settings) throws PdfAsException {
+			TablePos pos, ISettings settings) throws PdfAsException {
 
 		PdfBoxUtils.checkPDFPermissions(pdfDataSource);
 		// get pages of currentdocument
diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java
index 8a0a5e72..da8654ce 100644
--- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java
+++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java
@@ -249,8 +249,9 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
 					}
 				}
 
-				boolean legacy32Position = signatureProfileConfiguration.getLegacy32Positioning();
-				boolean legacy40Position = signatureProfileConfiguration.getLegacy40Positioning();
+				//Legacy Modes not supported with pdfbox2 anymore
+//				boolean legacy32Position = signatureProfileConfiguration.getLegacy32Positioning();
+//				boolean legacy40Position = signatureProfileConfiguration.getLegacy40Positioning();
 
 				// create Table describtion
 				Table main = TableFactory.createSigTable(signatureProfileSettings, MAIN, pdfObject.getStatus(),
@@ -267,7 +268,7 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
 				 */
 
 				PositioningInstruction positioningInstruction = Positioning.determineTablePositioning(tablePos, "",
-						doc, visualObject, legacy32Position, legacy40Position, pdfObject.getStatus().getSettings());
+						doc, visualObject, pdfObject.getStatus().getSettings());
 
 				logger.debug("Positioning: {}", positioningInstruction.toString());
 
@@ -734,10 +735,10 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants {
 			PositioningInstruction positioningInstruction = null;
 			if (signaturePosString != null) {
 				positioningInstruction = Positioning.determineTablePositioning(new TablePos(signaturePosString), "",
-						origDoc, visualObject, false, false, pdfObject.getStatus().getSettings());
+						origDoc, visualObject, pdfObject.getStatus().getSettings());
 			} else {
 				positioningInstruction = Positioning.determineTablePositioning(new TablePos(), "", origDoc,
-						visualObject, false, false, pdfObject.getStatus().getSettings());
+						visualObject, pdfObject.getStatus().getSettings());
 			}
 
 			origDoc.close();
-- 
cgit v1.2.3