Ank.DocToolkit 0.61.0

dotnet add package Ank.DocToolkit --version 0.61.0
                    
NuGet\Install-Package Ank.DocToolkit -Version 0.61.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ank.DocToolkit" Version="0.61.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ank.DocToolkit" Version="0.61.0" />
                    
Directory.Packages.props
<PackageReference Include="Ank.DocToolkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ank.DocToolkit --version 0.61.0
                    
#r "nuget: Ank.DocToolkit, 0.61.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ank.DocToolkit@0.61.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ank.DocToolkit&version=0.61.0
                    
Install as a Cake Addin
#tool nuget:?package=Ank.DocToolkit&version=0.61.0
                    
Install as a Cake Tool

The four numbers this library exists for: 0 native binaries, 0 MB runtimes folder, 0 network calls, 4 platforms in CI

DocToolkit

HTML in. Word and PDF out. Nothing else installed.

NuGet Downloads Runs on Linux, arm64, Windows and macOS MIT

You have a Linux container, a Word template and a PDF due on Friday. The usual answers are a headless Chrome, LibreOffice, or a licence with a revenue threshold.

DocToolkit is one NuGet package instead. It is pure managed code. It restores, builds and runs the same on your laptop and in the container.

Install

dotnet add package Ank.DocToolkit
// HTML in, a Word document and a PDF out. No browser, no LibreOffice, nothing to install.
byte[] docx = await HtmlToDocxConverter.ConvertAsync("<h1>Invoice 2026-114</h1>");
byte[] pdf = await HtmlToPdfConverter.ConvertAsync("<h1>Invoice 2026-114</h1>");

// Read a document back, edit one you were given, and lock it when you are done.
string text = DocxEditor.ExtractText(docx);
byte[] locked = PdfEditor.Protect(pdf, new PdfProtection { UserPassword = "s3cret" });

That is the whole setup: no browser download, no apt-get, no config file. It targets net8.0 and net10.0.

Numbers

runtimes folder after one dotnet add package: DocToolkit 0 MB, EPPlus 1 MB, QuestPDF 83 MB, NPOI 416 MB, ShapeCrawler 664 MB

Every bar takes a minute to reproduce. Add the package to an empty net8.0 app, build it, and measure runtimes/. The commands are in Measured against the alternatives.

What it does

Convert HTML and Markdown to DOCX and PDF; DOCX to HTML, Markdown and PDF; XLSX to CSV, HTML and PDF; PPTX to PDF; legacy Word 97-2003 .doc to DOCX; legacy PowerPoint 97-2003 .ppt to PDF
Edit create and edit DOCX, XLSX and PPTX; fill templates and forms, including one row per record; insert images; read text back out
PDF page count, merge, split, extract, rotate, reorder, insert; read text; read and stamp document information
Protect password-protect and unprotect PDF, DOCX, XLSX and PPTX
From ↓ / To → CSV DOC DOCX HTML Markdown PDF PPTX XLSX
CSV — · · · · · · ·
DOC · — ✅ · · · · ·
DOCX · · — ✅ ✅ ✅ · ·
HTML · · ✅ — · ✅ · ·
Markdown · · ✅ · — ✅ · ·
PDF · · · · · — · ·
PPTX · · · · · ✅ — ·
XLSX ✅ · · ✅ · ✅ · —

A ✅ is a converter that ships; · is a pair with no converter, not a promise about one. Read a row as "from this format, into these".

FAQ

Does it need Chrome or LibreOffice? No. Every PDF is rendered from a real Word document, in managed code.

Can I use it at work? Yes. It is MIT licensed, and every dependency is MIT, Apache-2.0 or BSD.

Does it reach the network? Not by default. Remote images are the one opt-in, and that stays bounded.

Is it trim-safe and ready for native AOT? Yes. CI publishes a trimmed and a native-AOT app and runs both. ClosedXML still emits warning IL2090.

What will it not do? CSS layout, mixed page setups and multi-line headers, among a few others. The list is in Known limitations.

Learn more

Every type in the package

Each name links to its API page.

Core

DocToDocxConverter, DocxToHtmlConverter, DocxToMarkdownConverter, DocxToPdfConverter, DocxToPdfPreflight, DocxToPdfPreflightFinding, DocxToPdfPreflightReport, DocxToPdfRisk, HtmlToDocxConverter, HtmlToPdfConverter, MarkdownEditor, MarkdownHeading, MarkdownToDocxConverter, MarkdownToPdfConverter, PptxToPdfConverter, XlsxToCsvConverter, XlsxToHtmlConverter, XlsxToPdfConverter

Word (DOCX)

DocxBlock, DocxComment, DocxCompare, DocxEditor, DocxForm, DocxFormField, DocxFormIssue, DocxFormIssueKind, DocxFormKey, DocxFormReport, DocxFormValidation, DocxFormValue, DocxFormValueKind, DocxMailMerge, DocxMailMergeBatchItem, DocxMailMergeBlockData, DocxMailMergeBlockReport, DocxMailMergeBlockResult, DocxMailMergeField, DocxMailMergeFieldStatus, DocxMailMergeFileBatchItem, DocxMailMergeIssue, DocxMailMergeIssueKind, DocxMailMergeReport, DocxMailMergeResult, DocxMailMergeTableRowGroup, DocxMailMergeTemplate, DocxReview, DocxReviewReport, DocxRevision, DocxRevisionKind

PDF

PdfBounds, PdfEditor, PdfEncryptionStrength, PdfImage, PdfMetadata, PdfProtection, PdfWord

PowerPoint (PPTX)

PptxSlide, PresentationEditor

Excel (XLSX)

PivotDataField, PivotFunction, WorkbookEditor, XlsxComment, XlsxFormat, XlsxFormula, XlsxFormulaCell, XlsxFormulaInspection, XlsxFreeze, XlsxHighlight, XlsxHyperlink, XlsxPageOrientation, XlsxPageSetup, XlsxRule, XlsxRuleKind, XlsxSheet, XlsxSparkline, XlsxSparklineKind, XlsxTable, XlsxTableStyle, XlsxValidation, XlsxValidationKind

Shared types

ChartData, ChartSeries, ChartType, ConversionLossKind, ConversionResult<T>, ConversionWarning, DocToolkitTelemetry, DocumentConversionException, DocumentMetadata, DocumentSignatureInfo, DocumentSignatureStatus, DocumentSignatureValidationOptions, DocumentSignatureValidationReport, DocumentSignatureValidationResult, DocxHeader, DocxHeaderSegment, HeaderAlignment, HtmlToPdfOptions, LegacyDocOptions, PageSetup, PdfFontOptions, RemoteImageOptions

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ank.DocToolkit:

Package Downloads
Ank.DocToolkit.Extensions.DependencyInjection

Dependency-injection registration for Ank.DocToolkit. services.AddDocToolkit() registers one injectable interface per capability - conversion between HTML, Markdown, DOCX, PDF, XLSX and PPTX, plus the DOCX/XLSX/PPTX/PDF editors - over the same pure-managed logic: no browser, no Chromium, no native binaries, no LibreOffice. For ASP.NET Core and worker-service consumers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.61.0 84 11/13/2026
0.60.1 175 11/10/2026
0.60.0 184 11/9/2026
0.59.0 379 11/3/2026
0.58.0 351 11/3/2026
0.57.3 300 10/16/2026
0.57.2 384 10/3/2026
0.57.1 496 9/3/2026
0.57.0 235 9/3/2026
0.56.0 859 9/3/2026
0.55.0 233 9/2/2026
0.54.0 407 9/2/2026
0.53.0 217 9/2/2026
0.52.0 351 9/2/2026
0.51.0 133 9/2/2026
0.50.0 451 9/2/2026
0.49.0 321 9/1/2026
0.48.0 379 9/1/2026
0.47.0 287 9/1/2026
0.46.0 414 8/31/2026
Loading failed

## [0.61.0](https://github.com/Ank-KhoaHo/DocToolkit/compare/v0.60.1...v0.61.0) (2026-11-13)


A Word form can now say which of its fields are locked before you fill it. The package page on
nuget.org also gets a short front page; the full reference moved, unchanged, to the
[Reference](https://ank-khoaho.github.io/DocToolkit/guides/reference.html) page of the docs site.

### Added

* **Core:** `DocxFormField.IsLocked` is true when a content control's content is locked (`w:lock` set to `contentLocked` or `sdtContentLocked`), which is exactly when `DocxForm.Fill` refuses to write it. A form UI can grey the field out instead of finding out from an exception. ([#551](https://github.com/Ank-KhoaHo/DocToolkit/issues/551)) ([1a6e405](https://github.com/Ank-KhoaHo/DocToolkit/commit/1a6e4052cb5c45d00fb94911a66b3789bd3ddea1))
* **Core:** `DocxFormIssueKind.LockedControl` (value 10). ([#551](https://github.com/Ank-KhoaHo/DocToolkit/issues/551)) ([1a6e405](https://github.com/Ank-KhoaHo/DocToolkit/commit/1a6e4052cb5c45d00fb94911a66b3789bd3ddea1))

### Changed

* **Core:** `DocxForm.Fill` now writes a control locked only against deletion (`sdtLocked`), as Word does, and keeps the lock. Since 0.54.0 it refused all three lock kinds alike. ([#551](https://github.com/Ank-KhoaHo/DocToolkit/issues/551)) ([1a6e405](https://github.com/Ank-KhoaHo/DocToolkit/commit/1a6e4052cb5c45d00fb94911a66b3789bd3ddea1))
* **Core:** `DocxForm.Validate` reports a value aimed at a content-locked control as `DocxFormIssueKind.LockedControl`; it reported `Other` before. A consumer that switched on `Other` for locks needs the new case. ([#551](https://github.com/Ank-KhoaHo/DocToolkit/issues/551)) ([1a6e405](https://github.com/Ank-KhoaHo/DocToolkit/commit/1a6e4052cb5c45d00fb94911a66b3789bd3ddea1))