pdfplumber icon indicating copy to clipboard operation
pdfplumber copied to clipboard

Extract digital signatures from pdf

Open FaizanCW opened this issue 3 years ago • 3 comments

Extract signature from signed PDF and get all information related to that signature and validate signature is authenticated or not, authentication means signature is attached in PDF is generally generated by or based on a certificate or key so when we need to check that signature is generated by a specific key or certificate then we will able to do that.

Please refer this stackoverflow solution for this functionality in which they have used pdfreader library for that: https://stackoverflow.com/questions/72556172/how-to-locate-digital-signatures-in-pdf-files-with-python

FaizanCW avatar Nov 10 '22 08:11 FaizanCW

Hi @FaizanCW, thanks for the suggestion. Do you have an example you could attach of a PDF with a digital signature that you'd like to verify?

Note to my future self and/or anyone who would like to implement this feature: The relevant section of the PDF reference is 8.7 Digital Signatures.

jsvine avatar Nov 22 '22 00:11 jsvine

pdf_digital_signature_timestamp.pdf

sample01.pdf

Here you find the sample pdfs with digital signature in it...Thanks @jsvine

FaizanCW avatar Nov 22 '22 04:11 FaizanCW

Please refer this library also for the reference...This library have much more functionality for digital signature validation and fetching all types of information of signature and certificate...! https://www.example-code.com/chilkat2-python/pdf_signatures.asp

FaizanCW avatar Nov 22 '22 04:11 FaizanCW