aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli/src/test/java/at/gv/egiz
diff options
context:
space:
mode:
authorThomas <>2023-01-12 16:07:30 +0100
committerThomas <>2023-01-12 16:07:30 +0100
commitb03842ccbef974873bb69d42c9e6cbc66403b432 (patch)
treea3a4dc6b3856538d993af21a417ad76d944088b9 /pdf-as-cli/src/test/java/at/gv/egiz
parent596818361623dbe537536683146c3df2a2fcdbb2 (diff)
downloadpdf-as-4-b03842ccbef974873bb69d42c9e6cbc66403b432.tar.gz
pdf-as-4-b03842ccbef974873bb69d42c9e6cbc66403b432.tar.bz2
pdf-as-4-b03842ccbef974873bb69d42c9e6cbc66403b432.zip
fix(sigblock): optimize image rendering of signature blocks
Issue: #65
Diffstat (limited to 'pdf-as-cli/src/test/java/at/gv/egiz')
-rw-r--r--pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/ProduceSignBlockImg.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/ProduceSignBlockImg.java b/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/ProduceSignBlockImg.java
index e3a087b3..7fe7eda7 100644
--- a/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/ProduceSignBlockImg.java
+++ b/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/ProduceSignBlockImg.java
@@ -1,7 +1,5 @@
package at.gv.egiz.pdfas.cli.test;
-import iaik.x509.X509Certificate;
-
import java.awt.Image;
import java.awt.image.RenderedImage;
import java.io.File;
@@ -16,10 +14,11 @@ import at.gv.egiz.pdfas.lib.api.Configuration;
import at.gv.egiz.pdfas.lib.api.PdfAs;
import at.gv.egiz.pdfas.lib.api.PdfAsFactory;
import at.gv.egiz.pdfas.lib.api.sign.SignParameter;
+import iaik.x509.X509Certificate;
public class ProduceSignBlockImg {
public static void main(String[] args) throws IOException, PDFASError, CertificateException {
- PdfAs pdfAs = PdfAsFactory.createPdfAs(new File("/home/afitzek/.pdfas"));
+ PdfAs pdfAs = PdfAsFactory.createPdfAs(new File("/home/tlenz/Projekte/pdfas4/config/default_4.2.0/"));
Configuration cfg = pdfAs.getConfiguration();
cfg.setValue("sig_obj.SIGNATURBLOCK_SMALL_DE.value.SIG_LABEL", "iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAAA30lEQVR42u2XQRKDMAhFcZVj5KamuWmO4SqUfLQz " +
@@ -27,9 +26,10 @@ public class ProduceSignBlockImg {
"Jj4vj1xEJS8J+1J6cg5YFqZ7FWRxNU2HxfsKUzkdIkP5tmGEkfW/9wiizyUvAFFQH2e7NyBBgAAAABJRU5ErkJggg==");
SignParameter signParameter = PdfAsFactory.createSignParameter(cfg, null, null);
- X509Certificate crt = new X509Certificate(new FileInputStream("/home/afitzek/qualified.cer"));
+ X509Certificate crt = new X509Certificate(new FileInputStream("/home/tlenz/diverses/cert_debug/cert_debug_1.crt"));
Image img = pdfAs.generateVisibleSignaturePreview(signParameter, crt, 256);
ImageIO.write((RenderedImage) img, "png", new File("/tmp/block.png"));
+
}
}