1

We are doing the RPA project and extract the data PDF to excel using python. Now we need verify the digital_signature in PDF.

Maksym Polshcha
  • 18,030
  • 8
  • 52
  • 77

2 Answers2

2

According to PDF 1.7 spec a document may contain:

  • one or more approval signatures
  • at most one certification signature
  • at most two usage rights signatures

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

Maksym Polshcha
  • 18,030
  • 8
  • 52
  • 77
0

You can check out https://cbrunet.net/python-poppler/usage.html#working-with-documents

which allows to load all PDF metadata as a Python dict.

If you need a dedicated function for signature validation, I think you need to ask specifically for the devs to implement it: https://github.com/cbrunet/python-poppler/issues

ferdymercury
  • 698
  • 4
  • 15