print-tortoise
A PDF printed from HTML can look right in one PDF engine and wrong in another. A CSS glow that MuPDF draws as a glow can become a solid coloured block in Apple's Preview. This package finds that before you print.
pip install print-tortoise
print-tortoise sheet.pdf --out pictures
REFUSED: page 1 has 1 partly transparent fill or line, which PDF engines do not all draw the same way
page 1: blocks unlike MuPDF: ghostscript 0.0%, coregraphics 0.0% pictures/page-1-engines.png
the printer's own interpreter is a fourth engine, and nothing here draws it
Each picture shows the page from each engine side by side, with the blocks that differ outlined in red.
from print_tortoise import transparency, check
transparency("sheet.pdf") # one sentence per page that uses transparency, [] when none does
check("sheet.pdf", "pictures") # the same, each engine's share of differing blocks, and the pictures
What it needs
MuPDF comes with the package. Ghostscript (gs) and a Swift compiler (swiftc, for Apple's engine on a Mac) are used when they are present, and an engine that is missing is left out and named.
Exit codes
The command exits 0 when the PDF uses no transparency, 1 when it does, and 2 when it could not run. With --strict it also exits 1 when Apple's engine differs from MuPDF on more than half a percent of a page's blocks.
What it cannot do
A printer's own interpreter is another engine, and nothing here can draw what it does. A page with no transparency at all is the only one this can vouch for.
License
This package's code is MIT. It depends on PyMuPDF, which is under the AGPL or a commercial license, so check that license fits your use.
Named after the Truth Tortoise from Rick and Morty, which shows you everything. This one only shows you the page your printer will get wrong.
Metadata
Release files for print-tortoise 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 | Provenance | Actions |
|---|---|---|---|---|
| print_tortoise-0.1.0.tar.gz | 11.1 kB | With provenance | Details for print_tortoise-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| print_tortoise-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for print_tortoise-0.1.0-py3-none-any.whl |
Total release size: 21.7 kB
Release files / print_tortoise-0.1.0.tar.gz
| Download URL | print_tortoise-0.1.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3a8f314b2eb84754b6268306e5cdde2971f26ca4d774997748693c4756d57b0
|
|
BLAKE2b-256 checksum How to use checksums |
a1121a7374637f6d2998023cbcec0e09a838a7d4366af26aee21a57073c24e3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 1, 2026.
Transparency logRelease files / print_tortoise-0.1.0-py3-none-any.whl
| Download URL | print_tortoise-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0bfec022e16848b2c3ffd0a5676ffa8b7a676788c906eca30e95a739fef495d
|
|
BLAKE2b-256 checksum How to use checksums |
5f792feda6024e668dda9bcdbfb3d9d54d227c701bda1815a2c5c35f915682a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 1, 2026.
Transparency logSecurity for print-tortoise 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for print_tortoise-0.1.0.tar.gz
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 Nov 1, 2026.
Transparency logA 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.