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

n8PDF

⚠️ Alpha software. n8PDF is in alpha testing: do not use it in production. The security register from the project's own audits is now fully closed and a fuzzer runs on every push, but nothing has shipped yet — see Prerelease Considerations.

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
Prerelease Considerations ⚠️ Alpha status: why not production yet, and the posture for untrusted documents
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, and how the audit register was closed
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
Reporting Bugs Filing an issue, the minimal reproducing .docx, and the label/severity vocabulary
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. The security register from the project's own audits — over a hundred findings — is fully closed, each fix carrying its attack as a test (Security); what remains open is chart features, static-analysis CI, and the NuGet release

Clone this wiki locally