Ingram Lightning Source PDF compliance checker and fixer
Project description
ingram-check
A command-line tool that checks PDF files for Ingram Lightning Source compliance and auto-fixes common issues.
Requirements
- Python 3.11+
- Ghostscript (
gs) — optional; use--use-ghostscriptto prefer it over the native Python backend
Installation
Homebrew (macOS & Linux)
brew tap saggingmeniscus/tap
brew install ingram-check
Installs a self-contained binary — no separate Python required. Supports macOS (Apple Silicon and Intel) and Linux (x86_64 and arm64), including WSL.
PyPI
pip install ingram-checker
# or
uv tool install ingram-checker
Standalone binary
Download the tarball for your platform from the latest release — ingram-check-macos-arm64, ingram-check-macos-x86_64, ingram-check-linux-x86_64, or ingram-check-linux-arm64 — extract it, and run ./ingram-check/ingram-check. No Python installation required.
From source
git clone https://github.com/saggingmeniscus/ingram-check.git
cd ingram-check
uv tool install .
After installation, the ingram-check command is available globally.
Usage
Interior PDFs
# Basic check — auto-detects page size
ingram-check interior book.pdf
# Specify trim size and color type
ingram-check interior book.pdf -t 6x9 -c bw
# With bleed
ingram-check interior book.pdf -t 6x9 --bleed
# Auto-fix (ICC removal, color conversion, crop stripping, downsampling, etc.)
ingram-check interior book.pdf --fix
# Unsafe fixes (includes upsampling low-res images)
ingram-check interior book.pdf --fix-unsafe
# JSON output
ingram-check interior book.pdf --format json
If --trim-size is omitted, the tool detects the page size from the PDF and reports it. An error is shown only if pages have inconsistent dimensions.
Trim sizes can be specified as dimensions (6x9, 5.5x8.5) or aliases (trade, a5, letter, digest, royal, mass market).
Cover PDFs
ingram-check cover cover.pdf -t 6x9
ingram-check cover cover.pdf -t 6x9 -b casewrap --fix
Listing checks
ingram-check interior --list-checks
ingram-check cover --list-checks
Individual checks can be toggled with -e (enable) and -d (disable):
ingram-check interior book.pdf -e bracketed_text -d margins
Checks
Interior (15 checks)
| Check | Severity | Auto-fixable |
|---|---|---|
| Font embedding | Error | |
| Page count (must be even) | Error | Yes |
| Page size consistency | Error | |
| Bleed dimensions | Error | |
| ICC profile removal | Error | Yes |
| Spot color removal | Error | Yes |
| Color space (Grayscale/CMYK) | Error | Yes |
| Crop/registration marks | Error | Yes |
| Ink density (warn 240%, error 300%) | Error | |
| Image resolution | Error/Warning | Yes* |
| Manufacturing statements | Error | |
| Paper certification claims | Error | |
| Bracketed text | Warning | |
| Margins (0.5" recommended) | Warning | |
| PDF/X compliance | Warning |
*Downsampling high-res images is a safe fix (--fix). Upsampling low-res images requires --fix-unsafe.
Cover (9 checks)
Font embedding, page count, cover size, ICC profiles, spot colors, color space, ink density, resolution, and barcode (manual verification).
Auto-fix
--fix applies safe, lossless corrections:
- Pad odd page count with a blank page
- Remove ICC profiles from page resources and image XObjects
- Convert spot colors to CMYK
- Convert RGB to Grayscale or CMYK
- Strip crop/registration marks by setting CropBox = TrimBox
- Downsample images above 375ppi to 300ppi
--fix-unsafe additionally applies fixes that may degrade quality:
- Upsample images below 300ppi (adds pixels via bicubic interpolation, but no real detail)
Fixed PDFs are written to <filename>_fixed.pdf in the same directory.
By default, all fixes use native Python (pikepdf + Pillow). Pass --use-ghostscript to use Ghostscript's pdfwrite device instead.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 ingram_checker-0.1.7.tar.gz.
File metadata
- Download URL: ingram_checker-0.1.7.tar.gz
- Upload date:
- Size: 84.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f71d902e2f252855caa340f088ee4ab04adebd531760d2b2caf371c472a3305c
|
|
| MD5 |
104cf2c09789f67eab6f6e702ca82882
|
|
| BLAKE2b-256 |
5f901b6ce37206b978d945cdbfd30240339e97ad74d65ec2a63e4a5a2e22fc4b
|
Provenance
The following attestation bundles were made for ingram_checker-0.1.7.tar.gz:
Publisher:
release.yml on saggingmeniscus/ingram-check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ingram_checker-0.1.7.tar.gz -
Subject digest:
f71d902e2f252855caa340f088ee4ab04adebd531760d2b2caf371c472a3305c - Sigstore transparency entry: 1672404419
- Sigstore integration time:
-
Permalink:
saggingmeniscus/ingram-check@953d3529da5bd5dc664fa975ae518d883f5f5bb7 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/saggingmeniscus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@953d3529da5bd5dc664fa975ae518d883f5f5bb7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ingram_checker-0.1.7-py3-none-any.whl.
File metadata
- Download URL: ingram_checker-0.1.7-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
677828c927b8757e030840f8732e604a63da0b91e8d76b7fc18ca0ba97cee212
|
|
| MD5 |
26967c4f4421f9aa397f3c9bd0d39942
|
|
| BLAKE2b-256 |
18b14aa4f6445a4779674aebe17a4c7b86034250ae7a6a992531239c1c5e28d3
|
Provenance
The following attestation bundles were made for ingram_checker-0.1.7-py3-none-any.whl:
Publisher:
release.yml on saggingmeniscus/ingram-check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ingram_checker-0.1.7-py3-none-any.whl -
Subject digest:
677828c927b8757e030840f8732e604a63da0b91e8d76b7fc18ca0ba97cee212 - Sigstore transparency entry: 1672404421
- Sigstore integration time:
-
Permalink:
saggingmeniscus/ingram-check@953d3529da5bd5dc664fa975ae518d883f5f5bb7 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/saggingmeniscus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@953d3529da5bd5dc664fa975ae518d883f5f5bb7 -
Trigger Event:
push
-
Statement type: