Is it possible to extract the visible signature (image of capture) of an signed PDF with itext?
Workflow:
- list all signatures of a file
- show with signatures include an visible signature
- show which are valid
- extract images of signatures (need to extract correct image for each signature)
1+3:
for (String name:af.getSignatureNames()) {
AcroFields af = reader.getAcroFields();
PdfPKCS7 pk = af.verifySignature(name);
}
2: will be solved with 4
4: Here begins the trouble. How is it possible to get the link to the correct field (annotation) and how can I render the embedded data as image (could also be implemented with an external image libary if needed).
I've found out how to get the Item, but not a link to Image Stream or PdfSignatureAppearance:
Item field = af.getFieldItem(name);
Thanks for your help. Greets.