Digitally sign and verify PDF documents (PAdES) with a pure-Rust backend — no Java, no OpenSSL. Import as `pdfsigner`.
Project description
pdfsigner (Python)
Digitally sign and verify PDF documents — full PAdES (ETSI EN 319 142) from B-B to B-LTA — with a single, dependency-free wheel. No Java, no OpenSSL, no Poppler, no system libraries.
pip install pdfsignerpy # pre-built wheels — no compiler, no Rust needed
import pdfsigner
pdfsigner.sign_pdf("in.pdf", "out.pdf", "keystore.p12", "password")
print(pdfsigner.verify_pdf("out.pdf")[0]["valid"]) # True
Why pdfsigner?
Most Python PDF-signing libraries lean on heavy native stacks — OpenSSL via
cryptography, a Java runtime, or external tools like Poppler. pdfsigner
bundles the entire crypto + PDF pipeline as one self-contained Rust extension
(the pure-Rust pdf_signer
crate, wrapped with PyO3).
- 🦀 Zero system dependencies — no OpenSSL, no Java, no Poppler, no
cffi. One wheel, nothing to apt-get. - 📦 Pre-built wheels for Linux (x86_64 · aarch64), macOS (Intel · Apple
Silicon, universal2) and Windows —
pip installand go, no Rust toolchain. - 🔏 Real PAdES, B-B → B-LTA — CAdES
signing-certificate-v2, RFC 3161 signature and document timestamps, and long-term validation (/DSSwith the chain, CRLs and OCSP). - ✅ Verification you can trust — RFC 5280 path validation whose name constraints and certificate-policy engine are validated against the NIST PKITS suite (42/42 policy + 38/38 name-constraint tests).
- 🔑 Modern keys — RSA, ECDSA (P-256/P-384) and Ed25519; CRL + OCSP revocation.
- 🖋 Rich visible signatures — a bordered box with an embedded TrueType/OpenType font and a PNG/JPEG logo, placed anywhere on any page.
- 🧩 Incremental updates — sign repeatedly; earlier signatures stay valid.
- 🔁 One engine, two languages — the same backend powers the
pdfsignerR package.
Installation
pip install pdfsignerpy
Wheels are published for common platforms, so installation needs no compiler and no Rust. To build from source on an unsupported platform, install a Rust toolchain from https://rustup.rs first (pip will compile it automatically).
The PyPI distribution is
pdfsignerpy, but youimport pdfsigner(the namepdfsigneris blocked on PyPI as too similar topdf-signer).
Usage
import pdfsigner
# Sign (invisible). Levels above "bb" need a tsa_url.
pdfsigner.sign_pdf(
"input.pdf", "signed.pdf", "keystore.p12", "password",
reason="Approval",
level="bb", # bb | bt | blt | blta
)
# Sign with a visible box, an embedded font and a logo.
pdfsigner.sign_pdf(
"input.pdf", "signed.pdf", "keystore.p12", "password",
signtext="Digitally signed",
font="Arial.ttf",
image="logo.png",
level="blta",
tsa_url="http://timestamp.digicert.com",
)
# Verify every signature.
for s in pdfsigner.verify_pdf("signed.pdf"):
print(s["valid"], s["signer"], s["detail"])
# Verify and validate the signer chain against trusted roots (e.g. ICP-Brasil).
pdfsigner.verify_pdf("signed.pdf", roots="icp-brasil-roots.pem")
verify_pdf returns one dict per signature with keys: valid, signer,
chain_trusted (bool or None when no roots given), covers_whole_document,
signed_len, byte_range and detail.
Architecture
import pdfsigner calls a thin PyO3 extension module that
links the pure-Rust pdf_signer crate (a git dependency pinned to v0.1.7).
The same engine powers the
pdfsigner R package.
Authors
- André Leite — Universidade Federal de Pernambuco (maintainer)
- Hugo Vasconcelos — Universidade Federal de Pernambuco
- Diogo Bezerra — Universidade Federal de Pernambuco
- Marcos Wasiliew — Universidade Federal de Pernambuco
- Carlos Amorim — Universidade Federal de Pernambuco
Citation
If you use this software, please cite it using the metadata in
CITATION.cff.
License
GPL-3.0-or-later. The bundled pdf_signer crate and its Rust dependencies
retain their own (permissive) licenses.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdfsignerpy-0.2.1.tar.gz.
File metadata
- Download URL: pdfsignerpy-0.2.1.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31c96e4460a2d089549676685df7aa0ab3ea13026a51d79a586784dcb836d572
|
|
| MD5 |
699d8591097ce4ec6695b3530bb15cdb
|
|
| BLAKE2b-256 |
6be02c05328205257d755bda0282e7eda7e5896ac8659af89f928fb7ea986191
|
Provenance
The following attestation bundles were made for pdfsignerpy-0.2.1.tar.gz:
Publisher:
release.yml on StrategicProjects/pdfsignerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdfsignerpy-0.2.1.tar.gz -
Subject digest:
31c96e4460a2d089549676685df7aa0ab3ea13026a51d79a586784dcb836d572 - Sigstore transparency entry: 2171058387
- Sigstore integration time:
-
Permalink:
StrategicProjects/pdfsignerpy@436d297b846a7a0124162588b0e575eb9abed5a7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@436d297b846a7a0124162588b0e575eb9abed5a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pdfsignerpy-0.2.1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: pdfsignerpy-0.2.1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 2.3 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c79c959ee327b048d91f2081a217cb1d2dbf2fd764588eea8f24359f3631ea0a
|
|
| MD5 |
978bf71bda31cd43a9d45dd87e964c7a
|
|
| BLAKE2b-256 |
9fc0865046c1251c3f35a8d718be4035d55351051d1971c289c308d1e11d90b8
|
Provenance
The following attestation bundles were made for pdfsignerpy-0.2.1-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on StrategicProjects/pdfsignerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdfsignerpy-0.2.1-cp39-abi3-win_amd64.whl -
Subject digest:
c79c959ee327b048d91f2081a217cb1d2dbf2fd764588eea8f24359f3631ea0a - Sigstore transparency entry: 2171058504
- Sigstore integration time:
-
Permalink:
StrategicProjects/pdfsignerpy@436d297b846a7a0124162588b0e575eb9abed5a7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@436d297b846a7a0124162588b0e575eb9abed5a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6364e634dffdbe437a2d4543459f7609a7baab3c1b57e0697b3e9c456a518a22
|
|
| MD5 |
7459ea3079ad9eca1fc8ede944dcee48
|
|
| BLAKE2b-256 |
5baa364ae8655b24af348d841a01fda6aced0abbd29b30e21f5712a87f9a3650
|
Provenance
The following attestation bundles were made for pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on StrategicProjects/pdfsignerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
6364e634dffdbe437a2d4543459f7609a7baab3c1b57e0697b3e9c456a518a22 - Sigstore transparency entry: 2171058847
- Sigstore integration time:
-
Permalink:
StrategicProjects/pdfsignerpy@436d297b846a7a0124162588b0e575eb9abed5a7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@436d297b846a7a0124162588b0e575eb9abed5a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c85a7d75e8a768ee02b45bb977e661a3e61d2d736e436c2e3bdea9d794f79b39
|
|
| MD5 |
4ee92ad6f81885cfa1d34b18e0f346da
|
|
| BLAKE2b-256 |
1a0ffe4e5e762f1a5fd65185a5c85aa6bee6f8598d755fc24dd9d36f419e8cce
|
Provenance
The following attestation bundles were made for pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on StrategicProjects/pdfsignerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdfsignerpy-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
c85a7d75e8a768ee02b45bb977e661a3e61d2d736e436c2e3bdea9d794f79b39 - Sigstore transparency entry: 2171058748
- Sigstore integration time:
-
Permalink:
StrategicProjects/pdfsignerpy@436d297b846a7a0124162588b0e575eb9abed5a7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@436d297b846a7a0124162588b0e575eb9abed5a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pdfsignerpy-0.2.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: pdfsignerpy-0.2.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47fc9d5f08184525d80d4ad47dee30d022c7451183012a8cce2665f9825c9af1
|
|
| MD5 |
2ff71e4309fc94a67a224b91b6b22c6a
|
|
| BLAKE2b-256 |
28543dcd93e43750a1eeb9f3a01727502f721897be59d977b4455cd5ed0cf3d0
|
Provenance
The following attestation bundles were made for pdfsignerpy-0.2.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on StrategicProjects/pdfsignerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdfsignerpy-0.2.1-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
47fc9d5f08184525d80d4ad47dee30d022c7451183012a8cce2665f9825c9af1 - Sigstore transparency entry: 2171058640
- Sigstore integration time:
-
Permalink:
StrategicProjects/pdfsignerpy@436d297b846a7a0124162588b0e575eb9abed5a7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/StrategicProjects
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@436d297b846a7a0124162588b0e575eb9abed5a7 -
Trigger Event:
push
-
Statement type: