DocToolkit
Convert HTML → DOCX and 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.
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
- HTML to Word and PDF — page setup, and what happens to an
<img>that points at a URL - Word documents — fill a template, build one from scratch, export it again
- Spreadsheets and presentations — XLSX and PPTX
- 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.