Introduction

Aspose.Words FOSS for .NET is now available: a free, open-source .NET library for creating, reading, and editing Word documents in pure C#, with no Microsoft Word installation required. It is aimed at developers who need to generate reports and letters from templates, read and restructure content out of existing .docx files, or convert Word documents to Markdown or plain text as part of a processing pipeline, without licensing a commercial SDK to do it.

The library is released under the MIT license and has no native dependencies — everything runs in managed code. It targets .NET Standard 2.0, so it works on .NET Framework 4.6.2+ and .NET 6, 8, and 10, on Windows, Linux, and macOS. A NuGet package has not been published yet; for now, build the library from source with a single dotnet build command (see Quick Start below).

What sets this apart from a typical new open-source document library is that it is not a rewrite or a wrapper. Aspose.Words FOSS for .NET is the genuine Aspose.Words codebase — the same document engine that has processed Word documents in production since 2003 — reduced down to a free, MIT-licensed core. Developers who outgrow this edition and need page layout, rendering, or the additional format converters can move to the commercial Aspose.Words for .NET without rewriting their code, since it is the same underlying API.


Key Features

Document Creation and Editing

Build documents from scratch with new Document() and the high-level DocumentBuilder, or open existing .docx files with new Document(fileName). DocumentBuilder provides sequential authoring methods such as Write(), Writeln(), InsertParagraph(), and InsertBreak(), along with formatting properties (Font, ParagraphFormat, PageSetup) that apply to content as it is inserted. For lower-level access, walk the document tree directly through Section, Paragraph, Run, and Table nodes, or subclass DocumentVisitor to process every node type in a single pass.

Tables and Lists

Tables are built from Table, Row, and Cell nodes. Table.SetBorders(), Table.SetShading(), and Table.AutoFit() format an entire table at once, while Table.Rows and per-row Cell access give finer control. Numbered and bulleted lists go through ListCollection and ListFormat: apply a built-in style with ListFormat.ApplyBulletDefault() or ApplyNumberDefault(), or register a custom list definition with ListCollection.Add().

Tracked Changes and Document Protection

Call Document.StartTrackRevisions() before editing to record insertions, deletions, and formatting changes, then inspect, accept, or reject them through RevisionCollection (AcceptAll(), RejectAll(), Accept(criteria), Reject(criteria)), or accept everything at once with Document.AcceptAllRevisions(). Document.Protect() applies password protection or read-only enforcement using the DocumentSecurity enum (ReadOnlyEnforced, ReadOnlyRecommended, PasswordProtected, and related values), and Document.Unprotect() reverses it.

Fields, Macros, and Digital Signatures

The field evaluation engine updates fields such as FieldDate (the DATE field) and FieldDocProperty (the DOCPROPERTY field) in place through Document.UpdateFields() — fields that depend on page layout, such as page numbers, evaluate to placeholder values since page layout is not part of this edition. DOCM and DOTM files round-trip with their VBA projects intact. Existing digital signatures can be inspected through DigitalSignatureCollection and DigitalSignature (IsValid, SubjectName, IssuerName, SignTime) to confirm whether a document is signed and has not been tampered with; creating new signatures is not part of this edition.

Charts

Insert a chart into a document with DocumentBuilder.InsertChart(), then configure its data series through the returned Chart object.

using Aspose.Words;
using Aspose.Words.Drawing.Charts;

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
Chart chart = shape.Chart;

// Delete default generated series.
chart.Series.Clear();

string[] categories = new string[] { "AW Category 1", "AW Category 2", "AW Category 3" };
chart.Series.Add("AW Series 1", categories, new double[] { 4.3, 2.5, 3.5 });

doc.Save("chart.docx");

Quick Start

Build the library from source — a NuGet package has not been published yet:

git clone https://github.com/aspose-words-foss/Aspose.Words-FOSS-for-.NET.git
cd Aspose.Words-FOSS-for-.NET
dotnet build Aspose.Words.sln -c Release

Then add a project reference to Aspose.Words.csproj from your application. With the reference in place, create a document with a chart and save it to DOCX:

using Aspose.Words;
using Aspose.Words.Drawing.Charts;

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.InsertChart(ChartType.Line, 432, 252);
Chart chart = shape.Chart;

// Delete default generated series.
chart.Series.Clear();

string[] categories = new string[] { "AW Category 1", "AW Category 2", "AW Category 3" };
chart.Series.Add("AW Series 1", categories, new double[] { 4.3, 2.5, 3.5 });

doc.Save("chart.docx");
Console.WriteLine("Saved chart.docx");

Supported Formats

FormatExtensionReadWrite
DOCX.docx
DOCM.docm
DOTX.dotx
DOTM.dotm
Flat OPC (all variants)(various)
Markdown.md
Text.txt

This edition intentionally excludes page layout and rendering — no PDF, XPS, or image export, and no printing, which also means layout-dependent field values such as page numbers evaluate to placeholders rather than being computed. The additional format converters (DOC, RTF, ODT, HTML, EPUB, MHTML, MOBI, AZW3, and WordML) are not read or written, and mail merge execution, LINQ Reporting, document comparison, creating new digital signatures, and embedded-font subsetting are not included. These are the same subsystems removed from the commercial codebase to keep this edition free.


Open Source & Licensing

Aspose.Words FOSS for .NET is released under the MIT license, free for both commercial and personal use with no royalties or redistribution restrictions. The full source is available on GitHub in the Aspose.Words FOSS for .NET repository.


Getting Started