This application allows you to sign PDF documents with an image of your signature. I found this problem when I needed to sign a pdf document. Online tools needed subscription. So, I decided to make a simple tool to sign pdf using python.
Ensure you have conda installed on your system.
-
Create a Conda Environment
conda create --name sign-pdf python=3.8
-
Activate the Environment
conda activate sign-pdf
-
Install Dependencies
Make sure you have a
requirements.txt
file in the root directory of your project. Install the required Python packages:pip install -r requirements.txt
To sign a PDF, run the following command:
python app.py --pdf path/to/your_pdf.pdf --sign path/to/your_sign(.jpg/.png) --output path/to/your_signed_pdf.pdf
--pdf
: Path to the PDF file that you want to sign.--sign
: Path to the image file of your signature.--output
: Path where the signed PDF will be saved.
Here's an example command to sign a PDF:
python app.py --pdf documents/sample.pdf --sign images/signature.png --output signed_documents/signed_sample.pdf
After running the application, a window will appear allowing you to draw the rectangular area where the signature will be placed. Follow these steps: