This PR includes changes to jsignpdf that make use of that new feature. However, maven decides that jsignpdf should depend on a pretty old version (1.3.30) of openpdf on my end, which complicated the testing of this new feature.
For case 2, the openpdf PR contains all necessary changes. However, the current jsignpdf is not compatible with the latest openpdf. Please apply the following patch on top of this jsignpdf PR:
Currently, vector images (svg, pdf) cannot be used as signature graphic. Related issue: #183
I proposed changes to the upstream openpdf (https://github.com/LibrePDF/OpenPDF/pull/1181) to support PDF as a visible signature.
This PR includes changes to jsignpdf that make use of that new feature. However, maven decides that jsignpdf should depend on a pretty old version (1.3.30) of openpdf on my end, which complicated the testing of this new feature.
I have tested in two different setups:
For case 1, this PR contains all jsignpdf changes. However my openpdf PR (https://github.com/LibrePDF/OpenPDF/pull/1181) is not compatible with 1.3.30 (https://github.com/LibrePDF/OpenPDF/tree/1.3.30). Instead, please apply the following patch to openpdf 1.3.30:
v1.3.30-Support-using-PDF-in-addition-to-images-as-the-signa.patch.txt
For case 2, the openpdf PR contains all necessary changes. However, the current jsignpdf is not compatible with the latest openpdf. Please apply the following patch on top of this jsignpdf PR:
For-testing-purpose-adapt-jsignpdf-to-openpdf-2.0.3.patch.txt
PS: if you want to use svg signatures, it is very easy to convert them to PDF:
inkscape in.svg --export-type=pdf -o out.pdf