Engine
Six packages. One writer.
Each CompilePDF producer lives in its own repo and PyPI package so you install only what you need. A shared core handles lineage, retention, and auth — producers depend on the core, never on each other.
compile-pdf-core
BetaShared infrastructure — lineage, retention, cache, auth, tasks.
The foundation every producer builds on. Lineage storage (memory / S3 / Redis), retention-consent handling, Celery task wrappers, cache key computation, and FastAPI auth/middleware. Install this alone if you're building a custom producer.
compile-pdf-trap
BetaInk-pair spread/choke trapping with OCG layer output.
Pure-Python trap engine (default) powered by codex-pdf's polygon_offset and spot-color resolver. Three engine slots: pure_python, ghostscript, external. Output strokes on an Optional Content Group so viewers can toggle the trap layer. Two-pass verify: schema + determinism + nothing-else + delta_e.
compile-pdf-impose
BetaSheet-level step-and-repeat layout.
Layout solved by codex_pdf.geom.tile_grid; Compile drops cells via pikepdf. Configurable sheet, gutter, cell rotation, and page mapping. Back-side modes: work-and-turn, work-and-tumble. Cell-extract round-trip verifier (Layer 5) confirms every cell matches its source page SHA-256.
compile-pdf-marks
BetaRegistration, crop, colour-bar, fold and proofing marks.
Twelve mark types across production, proofing, and universal categories. External-template ingestion via apply-multipart (PDF as Form XObject, PNG as Image XObject). Four-layer verifier including marks-layer SHA-256 reproducibility.
compile-pdf-rewrite
BetaObject-tree mutations: OCG, metadata, colour-space, hygiene.
Fifteen mutations across structural, hygiene, and lifecycle categories. OCG flips, page lifecycle ops, page-box patches, metadata set/strip, colour-space swap, JavaScript strip, PDF/X pin. Three-layer verifier: schema, determinism, nothing-else-touched.
compile-pdf-cjd
BetaCJD orchestrator — sequences all four producers in one job.
Compile Job Definition: a JSON/XML envelope that bundles a multi-producer run into a single submission. Sequences trap → rewrite → marks → impose with lineage threading across every stage. XML + JSON formats; each stage's diff artifact stored in the lineage record.
Dependency graph
compile-pdf-cjd → compile-pdf-trap + compile-pdf-impose + compile-pdf-marks + compile-pdf-rewrite → compile-pdf-core.
Producers never import each other.