aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/test
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-21 10:28:54 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-21 10:28:54 +0200
commitd16a7c27a77399806d1e2c6ae082e98d456c3baf (patch)
tree309ec8c90dd8274375ebb8480dfc3e5cafeeedb6 /pdf-as-lib/src/test
parent40841f154c31d8e9e6e670def11dcb5899f5db71 (diff)
downloadpdf-as-4-d16a7c27a77399806d1e2c6ae082e98d456c3baf.tar.gz
pdf-as-4-d16a7c27a77399806d1e2c6ae082e98d456c3baf.tar.bz2
pdf-as-4-d16a7c27a77399806d1e2c6ae082e98d456c3baf.zip
PDF API update to ouput signed documents via output stream
Diffstat (limited to 'pdf-as-lib/src/test')
-rw-r--r--pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/PDFToImage.java5
1 files changed, 4 insertions, 1 deletions
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);