A quick script to add signature images to PDFs, because I couldn’t find anything that worked well for the purpose under Linux.
Pros: should work with most PDFs, and with signatures as PNG’s or JPG’s. It preserves the incoming PDF’s text format (e.g. doesn’t convert every page to images like some alternatives).
Cons: no gui yet.
Installation
Install with pip:
pip install signpdf
Or from git:
git clone https://github.com/yourcelf/signpdf cd signpdf virtualenv venv source venv/bin/activate pip install -r requirements.txt
Usage
Sign the first page of “contract.pdf” with the signature “sig.png”:
signpdf contract.pdf sig.png –coords 1x100x100x150x40
- Coordinates format is: <pagenum>x<x-coord>x<y-coord>x<width>x<height>.
<pagenum> the page number, count starts at 1.
<x-coord> horizontal distance from bottom-left corner in PDF units (1/72 inch).
<y-coord> vertical distance from bottom-left corner in PDF units (1/72 inch).
<width> width of signature in PDF units (1/72 inch).
<height> height of signature in PDF units (1/72 inch)
Other options:
--date Append a date to the right of the signature.
--output Destination filename. Default is to append _signed to the incoming PDF name.
For more usage details, run signpdf --help.
Metadata
Release files for signpdf 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| signpdf-0.0.3.tar.gz | 2.9 kB | Without provenance | Details |
Release files / signpdf-0.0.3.tar.gz
| Download URL | signpdf-0.0.3.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50f06007f9bf30ad302f2e76ff01e25bbf4b944a4757555e8eec134599abb590
|
|
BLAKE2b-256 checksum How to use checksums |
014f2cc33cf3ea6d26c418e275961d73652b4d209e29d10380f8da46d5710905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for signpdf 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.