This script allows you to add a digital signature to a PDF file like FirmaEC does. It also provides an option to add a watermark to the PDF.
Before running the script, make sure you have the following installed:
- Python 3.x
- Required Python libraries (listed below)
- Clone or download the repository:
git clone https://github.com/DIOR27/pysign_ec.git cd pysign_ec
- Install the required Python libraries:
pip install -r requirements.txt
Run the following command to add a digital signature to the PDF file (you must to provide the path to the PDF file, the path to the .p12 file, the password for the .p12 file, and the text to search in the PDF for placing the signature):
python3 main.py path/to/pdf path/to/p12_file "password_for_p12_file" "text_to_search"
The script will generate a new PDF file with the digital signature added showing the followin output:
Signed PDF saved at 'Path/to/file.pdf'.