Skip to main content

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-ghostscript to prefer it over the native Python backend

Installation

Homebrew (macOS)

brew tap saggingmeniscus/tap
brew install ingram-check

PyPI

pip install ingram-checker
# or
uv tool install ingram-checker

Standalone binary (macOS Apple Silicon)

Download ingram-check-macos-arm64.tar.gz from the latest release, extract it, and run ./ingram-check from the extracted directory. 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

ingram_checker-0.1.5.tar.gz (81.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ingram_checker-0.1.5-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file ingram_checker-0.1.5.tar.gz.

File metadata

  • Download URL: ingram_checker-0.1.5.tar.gz
  • Upload date:
  • Size: 81.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ingram_checker-0.1.5.tar.gz
Algorithm Hash digest
SHA256 462c09dd05187476306c4e824c8b0586bed8bb00172d54f2d6436a22b00190bb
MD5 934ae218331439612a2b5bbcc4272881
BLAKE2b-256 a17d94f7ba3f61b9178120e70dc1e76a5ba1825cef17411a8934ddc20349189f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ingram_checker-0.1.5.tar.gz:

Publisher: release.yml on saggingmeniscus/ingram-check

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ingram_checker-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: ingram_checker-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ingram_checker-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3ff9f82ceb8dc6bbc8c02cb085384c39b5b55fbc82a96ad08a54842a0e04f9ce
MD5 c5b3f899739e8808b81d2b3af3f00d11
BLAKE2b-256 d6310f748c5a0589674bc327fb1b4f84c60a25f166e20dc5d45efc8785a27a91

See more details on using hashes here.

Provenance

The following attestation bundles were made for ingram_checker-0.1.5-py3-none-any.whl:

Publisher: release.yml on saggingmeniscus/ingram-check

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page