aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-cli/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-cli/src/test/java')
-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) {