From cf9c239ba2ce3883d9a6e334e8e2a40e4b9e6f3a Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Mon, 27 Jun 2022 07:56:51 +0000 Subject: Include failing font descriptor in IOException msg --- .../java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox2/PDFBoxFont.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pdf-as-pdfbox-2') diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox2/PDFBoxFont.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox2/PDFBoxFont.java index 415aa74a..a63d9d6f 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox2/PDFBoxFont.java +++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox2/PDFBoxFont.java @@ -218,7 +218,7 @@ public class PDFBoxFont { PDFont font = pdfObject.getSigBlockFontCache().getFont(fontDesc); if (font == null) { pdfObject.getSigBlockFontCache().showAvailableFonts(); - throw new IOException("Invalid font descriptor"); + throw new IOException("Invalid font descriptor \"" + fontDesc + "\""); } return font; } -- cgit v1.2.3 From b35bdd12f605dc1017b4ac892a8e033e25e685c1 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 12 Jan 2023 07:43:15 +0100 Subject: build(core): update third-party libs --- pdf-as-pdfbox-2/build.gradle | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pdf-as-pdfbox-2') diff --git a/pdf-as-pdfbox-2/build.gradle b/pdf-as-pdfbox-2/build.gradle index b37462bd..9d60b7b2 100644 --- a/pdf-as-pdfbox-2/build.gradle +++ b/pdf-as-pdfbox-2/build.gradle @@ -32,12 +32,12 @@ releases.dependsOn sourcesJar dependencies { implementation project (':pdf-as-lib') implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - implementation 'org.slf4j:jcl-over-slf4j:1.7.32' - api group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.25' - api group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.25' - api group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.25' - implementation group: 'commons-io', name: 'commons-io', version: '2.8.0' - implementation group: 'ognl', name: 'ognl', version: '3.2.19' + implementation 'org.slf4j:jcl-over-slf4j:1.7.35' + api group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.27' + api group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.27' + api group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.27' + implementation group: 'commons-io', name: 'commons-io', version: '2.11.0' + implementation group: 'ognl', name: 'ognl', version: '3.3.4' testImplementation group: 'junit', name: 'junit', version: '4.+' api group: 'com.github.jai-imageio', name: 'jai-imageio-jpeg2000', version: '1.4.0' -- cgit v1.2.3 From d10d0cf89d14d17d31b0a38c4f050190e276325a Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 12 Jan 2023 12:03:18 +0000 Subject: Properly close PDDocument in generateVisibleSignaturePreview --- .../at/gv/egiz/pdfas/lib/impl/signing/pdfbox2/PADESPDFBOXSigner.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pdf-as-pdfbox-2') 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 3e1b7d9a..df2a42bb 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 @@ -847,6 +847,9 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { //BufferedImage outputImage = firstPage.convertToImage(BufferedImage.TYPE_4BYTE_ABGR, (int) targetRes); + visualDoc.close(); + pdfRenderer = null; + BufferedImage cutOut = new BufferedImage((int) (position.getWidth() * factor), (int) (position.getHeight() * factor), BufferedImage.TYPE_4BYTE_ABGR); @@ -1006,4 +1009,4 @@ public class PADESPDFBOXSigner implements IPdfSigner, IConfigurationConstants { return numbers; } -} \ No newline at end of file +} -- cgit v1.2.3