Skip to content
npond edited this page Aug 24, 2026 · 9 revisions

n8PDF

n8PDF converts .docx to PDF, written from scratch. No third-party DOCX or PDF library, no headless Word, no LibreOffice, no browser engine, no sidecar service or container. A consumer adds one assembly reference and calls one method:

Converter.ConvertFile("report.docx", "report.pdf");

Everything happens inside that one assembly: the DOCX container is read, its markup parsed, styles resolved, text measured against the real font files, lines broken and pages composed, and the PDF written — including TrueType/CFF font subsetting and embedding, the Unicode bidirectional algorithm, complex-script shaping, image decoding, chart drawing and equation setting.

What sets it apart is how it matches Word: every layout rule that could not be read out of a specification was measured from Word's own output, with purpose-built probe documents designed so that only one candidate model survives the measurement. Across the comparison suite, line start positions match Word exactly, and what remains is almost everywhere a single step of the 1/300-inch grid Word itself rounds to. See Matching Word for the method.

Where to go

Page What it covers
Installation Requirements, getting the library, your first conversion, the options
The API The eight public types — the whole of what a version promises
Promises Zero dependencies, the frozen surface, warnings-as-errors, deterministic output
Security The attack surface of reading hostile documents — what is defended, what is honestly still open
Functionality Everything the converter implements today
Known Gaps What does not work, what is approximated, and what was declined by decision
Architecture The one-way pipeline from ZIP to PDF, and the directory map
Matching Word The fidelity method: measuring Word rather than trusting the spec
Validation The four test tiers, the three independent external checkers, and what runs where
Developers Cloning, building, testing, the invariants, and how to submit a PR

Status

  • License: MIT
  • Target: .NET 10 (net10.0), one shipping library
  • Package: n8PDF — the release pipeline exists and packs on every release tag, but the package has not yet been published to NuGet (#61); until then, build from source (Installation)
  • Backlog: lives entirely in GitHub Issues, including an open, honest register of security findings from the project's own audits (Security)

Clone this wiki locally