tpdf-client
A Python client for the tpdf command-line tool: read, edit, fill, redact, sign and verify PDF documents from a script.
This package alone does not read a PDF. The client starts the tpdf command-line tool
and returns its JSON reports as dictionaries. The tool comes with the tpdf application for
macOS and Windows, which has to be installed separately; see the
installation notes. There is no tool
for Linux, so the client finds nothing to start there. It has no dependencies of its own.
pip install tpdf-client
The import name is tpdf_client, not tpdf: another project on PyPI has that name.
from tpdf_client import Tpdf
pdf = Tpdf() # or Tpdf("/path/to/tpdf-cli", timeout=60)
print(pdf.info("report.pdf")["files"][0]["document"]["pages"])
report = pdf.redact("letter.pdf", "letter-redacted.pdf", texts=["Jane Doe"])
assert report["written"] and report["verified"]
pdf.merge(["cover.pdf", "report.pdf"], "combined.pdf")
# Highlights every match in a copy. Returns None, and writes nothing, when nothing matched.
pdf.mark_matches("report.pdf", "report-marked.pdf", texts=["North Pier"])
for file in pdf.search("a.pdf", "b.pdf", texts=["North Pier"])["files"]:
for match in file["matches"]:
print(file["path"], match["page"], match["hit"])
pdf.run(command, *arguments) reaches every command and returns a Result; its typed
property is the report, which the methods above return under the shape tpdf_client.reports names.
Every method is described in the tpdf README. Requires Python 3.10 or newer. MIT licence.
Metadata
Release files for tpdf-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tpdf_client-0.1.0.tar.gz | 24.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tpdf_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.0 kB
Release files / tpdf_client-0.1.0.tar.gz
| Download URL | tpdf_client-0.1.0.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d31246be255b3df5a114fc4e4fbf07e7c8ec3fdc4b89893dc28a448434197929
|
|
BLAKE2b-256 checksum How to use checksums |
d06919cf1c3879e9b0a35baff646fc61d4e13e43767750b35594e219751a25af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / tpdf_client-0.1.0-py3-none-any.whl
| Download URL | tpdf_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddb1531499d2448d257ab94f23cb27c44908e99c006d641a18a30bddcff8d241
|
|
BLAKE2b-256 checksum How to use checksums |
9831ec924941029eb131e4d4f0450af4ae519eeb7f6b277cc310e961849bed33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency log