emboss

Deterministic accessible PDF generation for Python

TLDR

Install the package (provides the emboss CLI)
$ pip install emboss-pdf
Build a multi-file Markdown directory into one PDF
$ emboss build [path/to/docs] -o [handbook.pdf]
Verify structural integrity or PDF/UA / PDF/A conformance
$ emboss verify [report.pdf]
$ emboss verify [report.pdf] --conformance ua1
Diff two PDFs into a redlined PDF
$ emboss diff [old.pdf] [new.pdf] -o [redline.pdf]
Reproduce a self-describing PDF from its embedded spec
$ emboss reproduce [report.pdf]
Strip embedded specs and internal ids before external sharing
$ emboss strip [report.pdf] -o [external.pdf]

SYNOPSIS

emboss command [options] [args]

DESCRIPTION

emboss is the command-line interface for Emboss (emboss-pdf on PyPI), a pure-Python typesetting engine that turns declarative specs or Markdown into PDF/UA-tagged, deterministic PDFs. The same semantic model drives layout and the structure tree so accessibility tags cannot drift from visible content. Output is designed to be byte-identical across runs when inputs match.The library API (Document, Fluent builders, from_markdown / from_json) is the primary authoring surface; the CLI covers batch builds, verification (including real veraPDF when installed), document redlines, reproducibility checks, and stripping embedded provenance before distribution.Optional extras add pydantic LLM schemas, pikepdf verification helpers, cryptography for signatures, and an MCP server surface for agent workflows.

COMMANDS

build dir -o out.pdf

Concatenate Markdown (and related sources) under dir into one PDF. Optional .order file lists files explicitly; numeric prefixes sort alphabetically.
verify file.pdf [--conformance ua1|2b|3b]
Structural checks, or shell out to veraPDF for PDF/UA-1 / PDF/A-2b / PDF/A-3b when verapdf is on PATH (or VERAPDF_PATH is set).
diff old.pdf new.pdf -o redline.pdf
Produce a redlined PDF of added/removed/changed blocks using stable node ids.
reproduce file.pdf
Recover the embedded EmbossSpec (or structure-tree fallback), re-render, and report structural agreement.
strip file.pdf -o out.pdf
Remove embedded files, some metadata, and structure-tree node ids for external sharing.

CAVEATS

Complex-script shaping (Arabic, Indic) and arbitrary HTML/CSS input are not supported. Conformance mode requires a real veraPDF installation. Package name on PyPI is emboss-pdf; the console script is emboss.

SEE ALSO

python(1), pdftotext(1), weasyprint(1)

RESOURCES

Source code · Homepage