Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a PDF file containing a Signature Field, using python?

In order to be able to sign a PDF document using a token based DSC, I need a so-called signature field in my PDF.

This is a rectangular field you can fill with a digital signature using e.g. Adobe Reader or Adobe Acrobat.

An image of the rectangular field you can fill with a digital signature using e.g. Adobe Reader or Adobe Acrobat.

I want to create this signable PDF in Python.

I'm starting from plain text, or a rich-text document (Image & Text) in .docx format.

How do I generate a PDF file with this field, in Python?

like image 788
Pranab Avatar asked Oct 15 '22 03:10

Pranab


1 Answers

Check out pyHanko. You can add, edit and digitally sign PDFs using Python.

https://github.com/MatthiasValvekens/pyHanko

It's totally free. And if you have any problems, Matthias is very helpful and responsive.

like image 195
kravb Avatar answered Oct 31 '22 19:10

kravb