|
@@ -275,7 +275,6 @@ class ActionDocToPDFWorkOrWorkCompleted extends BaseAction {
|
|
|
KeyStore keystore = KeyStore.getInstance("PKCS12");
|
|
KeyStore keystore = KeyStore.getInstance("PKCS12");
|
|
|
keystore.load(getClass().getResourceAsStream("/myKeystore.p12"), password.toCharArray());
|
|
keystore.load(getClass().getResourceAsStream("/myKeystore.p12"), password.toCharArray());
|
|
|
|
|
|
|
|
-
|
|
|
|
|
CreateVisibleSignature2 signing = new CreateVisibleSignature2(keystore, password.toCharArray());
|
|
CreateVisibleSignature2 signing = new CreateVisibleSignature2(keystore, password.toCharArray());
|
|
|
|
|
|
|
|
File imgFile = TempFile.createTempFile("sig", ".png");
|
|
File imgFile = TempFile.createTempFile("sig", ".png");
|
|
@@ -294,7 +293,10 @@ class ActionDocToPDFWorkOrWorkCompleted extends BaseAction {
|
|
|
signing.signPDF(pdfFile, signedPdfFile, humanRect, null, "Signature1");
|
|
signing.signPDF(pdfFile, signedPdfFile, humanRect, null, "Signature1");
|
|
|
|
|
|
|
|
return FileUtils.readFileToByteArray(signedPdfFile);
|
|
return FileUtils.readFileToByteArray(signedPdfFile);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
|
|
+ return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
public static void main(String[] args) throws Exception {
|