Metadata-Version: 2.4
Name: compile-pdf-white-underbase
Version: 0.1.0
Summary: CompilePDF white-underbase producer — white-ink / underbase plate generation for PDFs.
Project-URL: Homepage, https://compilepdf.com
Project-URL: Repository, https://github.com/printwithsynergy/compile-pdf-white-underbase
Project-URL: Issues, https://github.com/printwithsynergy/compile-pdf-white-underbase/issues
Author-email: Print With Synergy <iam@quincy.codes>
License: AGPL-3.0-or-later
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: click>=8.1
Requires-Dist: codex-pdf<2.0,>=1.21.1
Requires-Dist: compile-pdf-core<1.0,>=0.1.0
Requires-Dist: fastapi>=0.110
Requires-Dist: pikepdf>=8.13
Requires-Dist: pillow>=10.2
Requires-Dist: pydantic>=2.6
Requires-Dist: structlog>=24.1
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: mypy>=1.9; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# compile-pdf-white-underbase

CompilePDF **white / underbase** producer — generates a named white-ink (or
underbase / varnish / foil) separation plate for an input PDF.

Given an input PDF plus a policy describing how to derive the plate, the
producer registers a named DeviceN white separation in the output PDF. White
printing on transparent / dark substrates (labels, garment prints, foil-stamped
artwork) needs a white plate that lays down under every printable element;
screen-printing on dark fabric needs an underbase plate so the coloured inks
read true. Auto-generating the plate from the existing artwork keeps it in
register at every revision.

Like the other producers it is content-addressed (deterministic cache key) and
its router mounts into the central
[compile-pdf](https://github.com/printwithsynergy/compile-pdf) app, gated by
`COMPILE_PRODUCER`.

> Engine status: today's engine is a passthrough — it returns the input bytes
> verbatim with a fully-populated summary. The wire contract (request /
> response shape, cache-key derivation) is final so hosts can wire UI today; the
> underbase tracer lands in a follow-up.

Part of the CompilePDF producer family; each producer lives in its own repo and
PyPI package. See [compile-pdf](https://github.com/printwithsynergy/compile-pdf)
for the orchestrator that mounts them.

## Install

```bash
uv pip install compile-pdf-white-underbase
```

## HTTP surface

Mounted under `/v1/white-underbase` by the host app:

- `POST /v1/white-underbase/apply` — `{ input_pdf_b64, policy? }` → the output
  PDF (base64), content hashes, cache key, and a generation summary.

## CLI

```bash
compile-pdf-white-underbase [--policy policy.json] [--no-verify] in.pdf out.pdf
```

## License

AGPL-3.0-or-later. Copyright © 2024–2026 Print with Synergy.
