We are doing the RPA project and extract the data PDF to excel using python. Now we need verify the digital_signature in PDF.
According to PDF 1.7 spec a document may contain:
There are also 2 defined digest computing techniques. So there is no short answer and checking digital signatures might be tricky.
See PDF 1.7 section 12.8 Digital Signatures
As far as I know there is no ready-to-run python library to check all possible PDF signatures. You may try to use pdfreader to browse PDF document structure and to compute and check the signatures. See few examples