# Open-source document stack for agent pipelines (2026)

## How these projects were selected

- Clear **licenses** and maintained repos or normative specs.
- **Agent relevance:** CLI, APIs, skills/MCP, or deterministic batch builds.
- **Delivery vs ingestion** separated (reading PDF ≠ shipping PDF).

## At a glance

| Project | License | Primary output | Agent-friendly? | Determinism notes |
|---------|---------|----------------|-----------------|-------------------|
| **K2F** | Apache 2.0 | PDF, DOCX, PPTX, IDML, `.K2F` | Skill + MCP stdio | Lock; **PDF pixel-identical**; Office exports slight reflow |
| Pandoc | GPL | Many via filters | CLI in CI | Template-dependent |
| Typst | Apache 2.0 | PDF | CLI | Strong when compiler pinned |
| LaTeX / TeX Live | LPPL / mixed | PDF | Mature automation | Pin TeX year |
| Quarto | GPL | PDF, HTML, DOCX, … | R/Python/Jupyter | Reproducible envs |
| WeasyPrint | BSD | PDF from HTML/CSS | Python API | CSS pagination quirks |
| Marp | MIT | HTML/PDF slides | CLI | No native PPTX |
| Slidev | MIT | HTML/PDF slides (dev) | CLI + Vue | No native PPTX |
| python-docx / python-pptx | MIT | DOCX / PPTX | Libraries | You own OOXML |
| ReportLab | BSD | PDF | Python library | Programmatic PDF |
| Docling | MIT (verify repo) | Structured text from PDF | Pipelines | **Ingestion only** |
| Marker | GPL (verify repo) | Markdown from PDF | Pipelines | **Ingestion only** |
| OpenCode | MIT | Code repos | Terminal agent | Pair with K2F for docs |

## Markup and typesetting

### Typst, LaTeX, Quarto

- **Typst:** fast PDF for new developer reports ([typst.app](https://typst.app/)).
- **LaTeX:** academic and publisher norms; agent edits to `.tex` need care.
- **Quarto:** scientific multi-format from Markdown/Rmd.

## Conversion

### Pandoc

- Graph between markup families; DOCX via `reference.docx`.
- **Limitations:** Complex layout = your template problem.

## PDF delivery (generate)

### WeasyPrint, ReportLab, Typst/LaTeX

- Choose based on whether your source is **HTML**, **Python**, or **markup**.

## PDF ingestion (read—for agents, not publish)

### Docling and Marker

- **Docling** ([docling-project](https://github.com/docling-project/docling)): PDF → structured content for LLM workflows.
- **Marker**: PDF → markdown for analysis pipelines.
- **Do not** use these as substitutes for K2F/Typst/**lock-based** publish when you need a **golden** layout artifact.

## Slides from text

### Marp and Slidev

- **Marp:** Markdown → slides (HTML/PDF).
- **Slidev** ([sli.dev](https://sli.dev/)): developer slide decks in Vue ecosystem.
- **Limitations:** Neither is a native **PPTX** compiler—export via other tools if PowerPoint is required.

## Programmatic Office libraries

### python-docx and python-pptx

- Build or patch OOXML in code—common in agent scripts.
- **Limitations:** No cross-format lock or `pack_verify` story.

## Semantic packages and verify gates

### K2F

- Agents edit **semantic JSON**; engine compiles **render lock**; viewers/exports paint the lock ([exporting overview](https://k2f.dev/docs/guide/exporting.md)).
- **PDF:** pixel-identical to lock; **AcroForm** from `form_field` nodes.
- **DOCX/PPTX/IDML:** lock drawings; **slight reflow** allowed; **no Word content controls**; exports are **not sources** (`*_IS_NOT_A_SOURCE`).
- [Agent skill](https://k2f.dev/skills/k2f) + optional integrity signatures.

## Agent harness (not a document format)

### OpenCode

- MIT terminal/IDE agent ([github.com/anomalyco/opencode](https://github.com/anomalyco/opencode))—pair with K2F skill for deliverables.

## Pipelines readers actually build

1. **Academic PDF:** Agent → Quarto/LaTeX → PDF → human proofread.
2. **Investor pack:** Agent → K2F → PDF + PPTX + optional IDML package (`Document Fonts/`).
3. **Ops DOCX:** Agent → Markdown → Pandoc → DOCX with `reference.docx`.
4. **RAG on PDFs:** Docling/Marker → text → LLM; **separate** publish step via K2F or Typst.
5. **Open agent + open compiler:** OpenCode → K2F skill → verified exports.

## When K2F fits vs another OSS tool

- **K2F:** stable node IDs, multi-format lock exports, `pack_verify`, integrity banners.
- **Typst/LaTeX/Quarto:** PDF-first cultures; no built-in DOCX/IDML lock story.
- **Pandoc:** conversion glue with template maintenance.
- **Docling/Marker:** consume PDFs, do not deliver them.
- **OpenCode + K2F:** avoid locking both agent and compiler to one SaaS.

[Docs](/docs) · [Compare](/compare) · [GitHub](https://github.com/suzheng/k2f)

## Sources & freshness

| Project | Last verified | Source |
|---------|---------------|--------|
| K2F exporting | 2026-09 | `k2f/docs/guide/exporting*.md` |
| OpenCode | 2026-09 | github.com/anomalyco/opencode |
| Docling | 2026-09 | github.com/docling-project/docling |
| Typst, Slidev | 2026-09 | typst.app, sli.dev |

This roundup is based on publicly available information at the time of writing. Capabilities, pricing, and policies may change; verify details with the relevant provider.
