Support signing using PDF signatures (depends on upstream openpdf changes) #185
+10
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, vector images (svg, pdf) cannot be used as signature graphic. Related issue: #183
I proposed changes to the upstream openpdf (LibrePDF/OpenPDF#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 (LibrePDF/OpenPDF#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