diff options
author | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-06-15 10:40:22 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2016-08-17 16:49:39 +0200 |
commit | 464c44c367f32f8e7624a6b3ed3474c95a69d6fa (patch) | |
tree | 0fef5838d66e72d598bcfe6c07c9246610740f78 /pdf-as-pdfbox-2/src/main | |
parent | 922c5faaa0bbf5ace05dcc68ac8a2452ddec560a (diff) | |
download | pdf-as-4-464c44c367f32f8e7624a6b3ed3474c95a69d6fa.tar.gz pdf-as-4-464c44c367f32f8e7624a6b3ed3474c95a69d6fa.tar.bz2 pdf-as-4-464c44c367f32f8e7624a6b3ed3474c95a69d6fa.zip |
removed legacy modes for pdfbox2
Diffstat (limited to 'pdf-as-pdfbox-2/src/main')
2 files changed, 9 insertions, 8 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 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(); |