DocToolkit
Convert HTML and Markdown → DOCX and PDF, export DOCX → HTML/Markdown and XLSX → CSV/HTML, read text back out of a PDF, and open/edit DOCX, XLSX and PPTX, from .NET.
Pure managed. No native binaries, no browser, no LibreOffice, no Office interop.
Works after dotnet restore alone, runs on Linux, and makes no network calls at runtime.
Verified trim-safe and native-AOT compatible by publishing and running the real thing in CI.
dotnet add package Ank.DocToolkit
Targets net8.0 and net10.0. MIT licensed.
Start here
- Getting started — install, your first conversion, and the three conventions the whole API follows
- What it can convert — the complete grid, generated from the shipped API rather than written by hand
- HTML to Word and PDF — page setup, and what happens to an
<img>that points at a URL - Markdown, and conversion loss — Markdown in and out, and what
ConvertWithReporttells you - Word documents — fill a template, build one from scratch, export it again
- Spreadsheets and presentations — XLSX and PPTX, report formatting, and CSV/HTML export
- Dependency injection —
AddDocToolkit()and the injectable interfaces - Running in production — streaming, containers, fonts, trimming, telemetry
Two packages
- Ank.DocToolkit — the library. Static classes, no DI container required. API reference.
- Ank.DocToolkit.Extensions.DependencyInjection
—
services.AddDocToolkit(), for ASP.NET Core / worker-service consumers. API reference.
See the GitHub repository for source, runnable
samples (samples/), and the full README.