HankPDF
HankPDF is a free, Apache-2.0-licensed command-line tool and Python package for compressing scanned PDFs into searchable files, with a focus on medical and l…
What HankPDF is
HankPDF is a free, Apache-2.0-licensed command-line tool and Python package for compressing scanned PDFs into searchable files, with a focus on medical and legal documents. It processes files locally; the project says normal use involves no uploads, network activity, telemetry, or phone-home behavior. The CLI can compress PDFs, split output into chunks for size limits, and export selected pages as JPEG, PNG, or WebP images. HankPDF gives a typical compression target of 8–15× and up to 200× for text-dominant scans, while noting that already-efficient files may not shrink. It checks output through OCR-text comparison, tile-level SSIM, and a structural audit, and says it refuses to proceed rather than silently corrupt content. Python installation requires separate Tesseract and qpdf binaries; jbig2enc is optional, and the Docker image includes the native tools. The project is distributed through PyPI, GHCR, and its source repository. It is listed as free.
Good
- Local processing without normal-use network activity
- Compresses PDFs and exports selected pages as images
- Python compress() API and CLI
- Output checks include OCR and structural audits
- Apache-2.0 licensed and cleared for commercial use
Watch out
- Python install needs separate Tesseract and qpdf binaries
- Already-efficient PDFs may not shrink
- No offline desktop app
Who it suits
HankPDF suits people handling scanned medical or legal PDFs who want local compression, as well as developers who want a Python API. Its CLI and self-hosted options also fit users comfortable installing and managing software.
Verdict
HankPDF offers local PDF compression, image exports, and checks intended to catch content changes. Consider the native-tool installation requirements and the possibility that efficient files will not get smaller.
Plans and prices
From HankPDF's own pricing page, checked 11 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| HankPDF | Free | Apache-2.0 licensed; local command-line tool |
The facts
Each one read from HankPDF's own pages, with the date it was checked.
What it does
- API
- The Python package provides a compress() API as well as the hankpdf console command.checked 11 Oct 2026
- Compression
- The README gives a target of 8–15× typical compression and up to 200× on text-dominant scans, while warning that already-efficient files may not shrink.checked 11 Oct 2026
- Content checks
- Outputs are checked with OCR-text comparison, tile-level SSIM, and a structural audit; the project says it refuses rather than silently corrupting content.checked 11 Oct 2026
- Dependencies
- A Python install requires separate Tesseract and qpdf binaries; jbig2enc is optional but improves text-only compression, and the Docker image includes these native tools.checked 11 Oct 2026
- Installation
- The project is distributed through PyPI and GHCR, or can be installed from its source repository.checked 11 Oct 2026
- License
- HankPDF is licensed under Apache-2.0, and the README states it is cleared for commercial use.checked 11 Oct 2026
- Local processing
- It runs on the user's machine and states that PDFs are never uploaded, with no network, telemetry, or phone-home behavior during normal use.checked 11 Oct 2026
- Output options
- The CLI can produce compressed PDFs, split output into chunks for size limits, and export selected pages as JPEG, PNG, or WebP images.checked 11 Oct 2026
- Purpose
- HankPDF compresses scanned PDFs into compact, searchable PDFs, with a focus on medical and legal documents.checked 11 Oct 2026
- Release integrity
- The security policy says Docker images are signed with cosign and carry SLSA provenance and an SPDX SBOM; PyPI publishing uses checksum and GitHub OIDC provenance.checked 11 Oct 2026
- Security
- The security policy says compression does not open network sockets or transmit user data and describes subprocess resource limits for hostile PDF parsing.checked 11 Oct 2026
- Support
- The README directs users who remain stuck to open a GitHub issue and attach the output of hankpdf --version.checked 11 Oct 2026
The company
- Maker location
- The maker's GitHub organization profile lists Hank AI, Inc. in the US.checked 11 Oct 2026
Where it runs
- Platforms
- The README documents native installation on Windows, macOS, and Linux, plus Docker use on those systems.checked 11 Oct 2026
Alternatives to HankPDF
- 1

BentoPDF Hyper Compress
Free planOpen sourceWebAPIExtensionLinux8.3From $99 a year - 2

PDF2Go
Free planAndroidiOSWebAPI8.2$6.42 usage-based - 3

Smallpdf
Free planAndroidiOSWebWindows8.1From $10 a month - 4

Xodo Compress PDF
Free planAndroidiOSWebAPI8.1From $7.99 a month - 5

PDF Candy
Free planAndroidiOSWebLinux7.9From $4 a year - 6

Compresto
iOSWebAPIExtension7.5$49 one-time
