wordnet 1.3.0
dotnet add package wordnet --version 1.3.0
NuGet\Install-Package wordnet -Version 1.3.0
<PackageReference Include="wordnet" Version="1.3.0" />
<PackageVersion Include="wordnet" Version="1.3.0" />
<PackageReference Include="wordnet" />
paket add wordnet --version 1.3.0
#r "nuget: wordnet, 1.3.0"
#:package wordnet@1.3.0
#addin nuget:?package=wordnet&version=1.3.0
#tool nuget:?package=wordnet&version=1.3.0
wordnet
Document conversion and automation for .NET. Create, edit and convert Word documents with local processing, bounded resource use and explicit fidelity diagnostics.
- Convert DOC and DOCX to and from PDF, Markdown, text, EPUB, MOBI, AZW3, HTML and RTF. Export Word documents to XPS.
- Populate templates with mail-merge fields, repeated table rows, conditional content and caller-supplied images.
- Compose documents and export editable DOCX or selectable-text PDF without Microsoft Office or a remote service.
- Add optional local English OCR for scanned PDFs.
Windows and Linux · x64 and ARM64 · MIT licensed
Quick start · Automation recipes · Supported formats · Documentation
Install
dotnet add package wordnet
The public namespace is WordNet. NuGet package and assembly names use wordnet.
The core package includes wordnet.Fonts and supports managed document export without native providers.
For all PDF input, including digital PDFs, install the optional provider at the same version:
dotnet add package wordnet.Ocr
This provider also supplies PNG previews and optional native typography. English OCR additionally requires a local Tesseract 5 library and eng.traineddata.
See the OCR setup guide and deployment requirements.
P1 additions in merged source
PR #85 merged unequal DOCX columns, bounded report preprocessing, body paragraph repeats, DOCX ↔ ODT exchange, and opt-in DOCX review workflows. These additions are part of the 1.3.0 source profile; earlier 1.2.x packages exclude them. The automation example includes executable P1 recipes. Existing default review interpretation and earlier format pairs remain; ODT is limited to the two DOCX exchanges.
1.3.0 object and typography additions
The 1.3.0 source adds bounded editable column/line charts and OMML equations, managed PDF/XPS/SVG rendering, and opt-in Unicode 17 bidi/Hindi paragraphs with a qualified ordinary PDF/UA-1 profile. Math needs an explicit caller MATH font; native text needs the optional provider and suitable caller fonts. Objects and native/UA output have separate combination limits. See the P2 profile and capability matrix. These changes are implemented in PR #86, building on merged P0 and P1 work. See the 1.3.0 release record for qualification and publication status.
Quick start
Convert a DOCX document to PDF and inspect any reported fidelity losses. Stage output before replacing an existing file:
using System;
using System.IO;
using WordNet;
using var source = File.OpenRead("input.docx");
using var staged = new MemoryStream();
var converter = new WordConverter();
ConversionResult result = await converter.ConvertAsync(
source, staged, DocumentFormat.Docx, DocumentFormat.Pdf,
new ConversionOptions(FidelityMode.BestEffort));
foreach (ConversionDiagnostic diagnostic in result.Diagnostics)
Console.WriteLine($"{diagnostic.Code}: {diagnostic.Message}");
File.WriteAllBytes("output.pdf", staged.ToArray());
Strict mode is the default and rejects detected unsupported features before copying output. Best effort retains supported content and reports losses. Lenient mode additionally approximates documented layout problems. Malformed input, resource limits, cancellation and I/O errors can still fail in every mode.
DOC and PDF import always report formatting or reconstruction loss and require best effort or lenient mode. Use Inspect / InspectAsync for preflight diagnostics, source locations, font mappings and optional fixed-page layout. CanConvert describes format pairs; it does not guarantee support for every feature in a document.
See conversion usage and diagnostics.
Automation recipes
WordDocument provides bounded creation, editing, composition and template sessions:
using System.IO;
using WordNet;
WordDocument document = WordDocument.Create();
document.AddParagraph("Quarterly report", headingLevel: 1);
document.AddParagraph("Completed 18 projects this quarter.");
using var output = new MemoryStream();
document.Save(output, DocumentFormat.Docx);
File.WriteAllBytes("report.docx", output.ToArray());
From a source checkout, one command generates a complete invoice and a two-section report, each as editable DOCX and PDF:
dotnet run --project examples/WordNet.Automation -c Release -- artifacts/automation-sample
The invoice includes repeated line items, a caller-provided logo, optional payment terms and totals calculated in application code. The report includes a summary table, header/footer and page fields refreshed during PDF layout. Both recipes print load, edit and save diagnostics and stage conversions before replacing files.
See the recipe instructions and editing and template guide for syntax, limits and expected losses.
Supported formats
Each earlier bidirectional exchange below works with both DOC and DOCX. ODT is limited to DOCX. At least one side of a conversion must be DOC or DOCX; XPS is output-only.
| Format | Implemented profile |
|---|---|
| DOCX ↔ DOC | Editable text, styles, lists, tables and supported raster drawings; binary DOC retains a documented subset |
| PDF ↔ Word | Managed selectable-text PDF export; digital text/simple raster import and optional English OCR |
| Markdown / text ↔ Word | Unicode text, headings, emphasis, links, lists and supported pipe tables; formatting losses are diagnosed |
| HTML ↔ Word | UTF-8 HTML5, bounded CSS, nested lists/tables, merged cells, embedded raster images and safe links |
| RTF ↔ Word | Bounded Unicode/code-page text, emphasis, paragraphs, basic lists/tables and PNG/JPEG |
| EPUB ↔ Word | EPUB package/spine reading and EPUB 3 writing with the supported XHTML/CSS/image subset |
| MOBI / AZW3 ↔ Word | Unencrypted MOBI 6 and standalone KF8 profiles; no DRM or hybrid containers |
| Word → XPS | Positioned text, embedded fonts, raster images and shared fixed-page layout |
| DOCX ↔ ODT (merged source) | Bounded ODF 1.3 text/styles/lists/masters/tables/inline PNG/JPEG; explicit feature/style losses |
The shared layout profile includes section geometry, wrapping and pagination, table widths/merges/repeated headers, bounded drawings, notes and page fields. Optional profiles cover Arabic typography, semantic PDF/UA and previews. These capabilities have specific combination and fidelity limits.
PDF import reconstructs editable content; it does not recover arbitrary original tables, styles or pagination. OCR targets English printed text, with optional rotation/deskew and known two-column reading order. Handwriting is outside the profile.
Password encryption/decryption and DOCX/PDF digital signatures are not implemented and are excluded from the current roadmap at the owner's request. Password-protected input and signed-document workflows remain unsupported; no confidentiality, signature-validity or signer-trust utility is provided. The 1.3.0 candidate implements the bounded chart/equation subset described above; advanced charts and general mathematical layout remain unsupported. Default DOCX loads render revisions in their accepted state with diagnostics; Strict rejects revision/comment loss. The merged opt-in review profile preserves its declared subset separately. Complete Word pagination parity and arbitrary drawing/CSS behavior are not guaranteed.
See the fidelity profile, DOC subset and interoperability guide.
Frameworks and platforms
The library targets net462, net472, netstandard2.0, net8.0 and net10.0 with matching public APIs.
| Target | Qualification and requirements |
|---|---|
| .NET 8 / .NET 10 | Native Windows/Linux x64 and ARM64 conversion/OCR source and package suites |
| .NET Framework 4.7.2+ | Windows x64; actual 4.7.2 requires the legacy JIT configuration below; 4.8.1 tested with default settings |
| .NET Framework 4.6.2 asset | Builds and executes on Framework 4.8.1; actual 4.6.2 execution remains unqualified |
| .NET Standard 2.0 | Portable fallback with explicit asset-consumption checks on modern .NET |
| Android / macOS | Deferred; no release support claim |
Applications running on actual Framework 4.7.2 x64 must configure the legacy JIT, preserving existing binding redirects:
<configuration>
<runtime>
<useLegacyJit enabled="1" />
</runtime>
</configuration>
The library cannot configure its host runtime. Compilation and package compatibility are separate from runtime qualification. See minimum-runtime requirements and build-specific test evidence.
Streams and resource limits
Caller streams remain open. Reading and writing begin at their current positions; output is not truncated. Supply distinct streams and a fresh destination.
Output is staged inside the converter. Parsing, fidelity and admission-limit failures leave caller output untouched; cancellation or I/O errors during final copying can leave partial output. Opening a destination with File.Create already truncates it, which is why the quick start stages in memory first.
Defaults bound input to 16 MiB, output to 32 MiB, container expansion to 64 MiB, ZIP entries to 1,024, characters to four million, nesting to 64 and pages to 1,000. These are admission checks, not hard CPU/RSS limits. Async methods use async stream I/O; parsers, renderers and most native calls execute synchronously.
XML entities and DTDs are prohibited. Conversion does not execute scripts/macros or fetch remote resources. For untrusted workloads and hard deadlines, use isolated hosting.
Build and test
Install the pinned SDK from global.json, plus .NET 8/10 runtimes. Provision local OCR prerequisites in the same PowerShell process that launches tests:
./eng/prepare-ocr-tests.ps1
dotnet restore wordnet.sln --locked-mode
dotnet build wordnet.sln -c Release --no-restore
dotnet test tests/wordnet.Conversion.Tests -c Release -f net8.0 --no-build --no-restore
dotnet test tests/wordnet.Conversion.Tests -c Release -f net10.0 --no-build --no-restore
dotnet format wordnet.sln --verify-no-changes --no-restore
./eng/pack.ps1
Linux requires Tesseract, fontconfig and the documented fonts. Run Framework tests only on a compatible Windows host. See testing for full prerequisites and platform limits, and the comparison harness for 24 independently authored business fixtures and office-reference measurements.
Documentation
| Guide | Contents |
|---|---|
| Usage | Conversion, OCR and configuration examples |
| Editing and templates | Creation, editing, composition and merge controls |
| Architecture | Engine boundaries, providers and resource contracts |
| Diagnostics | Fidelity reports and preflight remediation |
| Implementation plan | Delivered work and remaining scope |
| Release ledger | Published packages and exact-artifact evidence |
| Contributing | Engineering and validation requirements |
License
MIT · Copyright © 2026 Armen Kirakosyan.
Implementation uses independently authored code, published specifications and appropriately licensed dependencies. See third-party and font notices.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- AngleSharp (>= 1.8.4)
- Markdig (>= 1.4.0)
- OpenMcdf (>= 3.3.0)
- PdfPig (>= 0.1.16)
- PdfPig.Filters.Dct.JpegLibrary (>= 0.1.16.1)
- System.Text.Encoding.CodePages (>= 10.0.12)
- wordnet.Fonts (>= 1.3.0)
-
.NETFramework 4.7.2
- AngleSharp (>= 1.8.4)
- Markdig (>= 1.4.0)
- OpenMcdf (>= 3.3.0)
- PdfPig (>= 0.1.16)
- PdfPig.Filters.Dct.JpegLibrary (>= 0.1.16.1)
- System.Text.Encoding.CodePages (>= 10.0.12)
- wordnet.Fonts (>= 1.3.0)
-
.NETStandard 2.0
- AngleSharp (>= 1.8.4)
- Markdig (>= 1.4.0)
- OpenMcdf (>= 3.3.0)
- PdfPig (>= 0.1.16)
- PdfPig.Filters.Dct.JpegLibrary (>= 0.1.16.1)
- System.Text.Encoding.CodePages (>= 10.0.12)
- wordnet.Fonts (>= 1.3.0)
-
net10.0
- AngleSharp (>= 1.8.4)
- Markdig (>= 1.4.0)
- OpenMcdf (>= 3.3.0)
- PdfPig (>= 0.1.16)
- PdfPig.Filters.Dct.JpegLibrary (>= 0.1.16.1)
- wordnet.Fonts (>= 1.3.0)
-
net8.0
- AngleSharp (>= 1.8.4)
- Markdig (>= 1.4.0)
- OpenMcdf (>= 3.3.0)
- PdfPig (>= 0.1.16)
- PdfPig.Filters.Dct.JpegLibrary (>= 0.1.16.1)
- System.Text.Encoding.CodePages (>= 10.0.12)
- wordnet.Fonts (>= 1.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on wordnet:
| Package | Downloads |
|---|---|
|
wordnet.Ocr
Optional native PDF import, local English OCR, Arabic typography and PNG preview providers for wordnet. Managed document export does not require this package. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Bounded reporting and columns, DOCX/ODT exchange and review workflows, editable charts and OMML equations, Unicode 17 bidi and opt-in Hindi/native accessible PDF. Includes object fidelity review fixes. Cryptographic features remain unsupported. See the 1.3.0 release notes and documented profile limits.