From d16a7c27a77399806d1e2c6ae082e98d456c3baf Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 21 Oct 2014 10:28:54 +0200 Subject: PDF API update to ouput signed documents via output stream --- .../src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pdf-as-lib/src/test') diff --git a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java index f78319c6..caf3472a 100644 --- a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java +++ b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java @@ -4,6 +4,7 @@ import iaik.x509.X509Certificate; import java.awt.Image; import java.awt.image.RenderedImage; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; @@ -59,8 +60,10 @@ public class PDFToImage { X509Certificate cert = new X509Certificate(new FileInputStream( "/home/afitzek/qualified.cer")); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + SignParameter parameter = PdfAsFactory.createSignParameter( - config, null); + config, null, baos); parameter.setSignatureProfileId(profile); Image img = pdfas.generateVisibleSignaturePreview(parameter, cert, 128); -- cgit v1.2.3