aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli
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-cli/src/test/java/at/gv/egiz/pdfas/cli
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-cli/src/test/java/at/gv/egiz/pdfas/cli')
-rw-r--r--pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java b/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java
index 6b1eeaa9..75f19c71 100644
--- a/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java
+++ b/pdf-as-cli/src/test/java/at/gv/egiz/pdfas/cli/test/SignaturProfileTest.java
@@ -98,17 +98,16 @@ public class SignaturProfileTest {
System.out.println("Testing " + profile);
DataSource source = new ByteArrayDataSource(input);
-
+
+ FileOutputStream fos = new FileOutputStream(targetFolder + profile + ".pdf");
SignParameter signParameter = PdfAsFactory.createSignParameter(
- config, source);
+ config, source, fos);
signParameter.setPlainSigner(signer);
signParameter.setSignatureProfileId(profile);
SignResult result = pdfas.sign(signParameter);
- FileOutputStream fos = new FileOutputStream(targetFolder + profile + ".pdf");
- IOUtils.copy(result.getOutputDocument(), fos);
fos.close();
}
@@ -120,17 +119,15 @@ public class SignaturProfileTest {
System.out.println("Testing " + profile);
DataSource source = new ByteArrayDataSource(inputPDFA);
-
+ FileOutputStream fos = new FileOutputStream(targetFolder + "PDFA_" + profile + ".pdf");
SignParameter signParameter = PdfAsFactory.createSignParameter(
- config, source);
+ config, source, fos);
signParameter.setPlainSigner(signer);
signParameter.setSignatureProfileId(profile);
SignResult result = pdfas.sign(signParameter);
- FileOutputStream fos = new FileOutputStream(targetFolder + "PDFA_" + profile + ".pdf");
- IOUtils.copy(result.getOutputDocument(), fos);
fos.close();
}
} catch (Throwable e) {