Skip to main content

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)

Source distribution for print-tortoise 0.1.0
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)

Table of built distributions (wheels) for print-tortoise 0.1.0
File Interpreter ABI Platform Actions
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

Security 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.

Select from 2 files

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 log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page