Quillwright 0.2.6
dotnet add package Quillwright --version 0.2.6
NuGet\Install-Package Quillwright -Version 0.2.6
<PackageReference Include="Quillwright" Version="0.2.6" />
<PackageVersion Include="Quillwright" Version="0.2.6" />
<PackageReference Include="Quillwright" />
paket add Quillwright --version 0.2.6
#r "nuget: Quillwright, 0.2.6"
#:package Quillwright@0.2.6
#addin nuget:?package=Quillwright&version=0.2.6
#tool nuget:?package=Quillwright&version=0.2.6
Quillwright
A .NET library for Word documents (Apache-2.0). Layered the way System.Text.Json is —
primitives, streaming, document model, typed templating — with a paragraph representation
built for the way Word actually stores text.
using Quillwright.Model;
var doc = WordDocument.Create();
doc.Sections[0].AddParagraph("Supply agreement", "Heading1");
doc.Sections[0].AddParagraph("Signed today.");
await doc.SaveAsync("agreement.docx");
What it does
- Edits real documents without breaking their copy-through content. Charts, SmartArt, embedded objects, custom XML, themes and VBA are carried through byte for byte. In the current 934-file Open XML SDK 3.5.1/Telerik reference snapshot, 932 unencrypted packages save and reload with identical extracted text, every original relationship record and every non-relationship OPC part still present, and every copy-through part hash-identical. The two password-protected fixtures are separate expected-refusal tests; validator-clean inputs must remain validator-clean after save.
- Data-oriented paragraphs. A paragraph is one text buffer with runs, hyperlinks,
bookmarks and comment ranges laid over it as offset ranges.
paragraph.Textis free, and find-and-replace across run boundaries is an ordinary splice rather than a stitching job. - Constant-memory streaming in both directions:
DocxWritergenerates reports without building a model,DocxReaderyields one block at a time. - An honest style resolver. Document defaults, table styles with their conditional
regions, numbering, the
basedOnchain and direct formatting, layered in the order ISO-29500 specifies. - Typed templating with no reflection.
[WordTemplate]on a record, and an incremental source generator writes the binder. - Tracked changes you can record, and a redline from two documents:
DocumentComparer.Compare(original, revised)records every difference as an ordinary tracked change, so accepting them all yields the revised text and rejecting them all the original. - Documents that assemble.
contract.Append(annex)copies another document's content in, carrying the styles, numbering, images, notes and comments it leans on. - Fields that compute, equations as a tree, legacy
.docboth ways, digital signatures verified and written, and macros you can read. - PDF, laid out properly.
document.SaveAsPdf("report.pdf")paginates with real font metrics: wrapping and justification, hyphenation, tables with merged cells and repeating headers, footnotes, headers and footers with working page numbers, text flowing round floating pictures, right-to-left scripts. Optionally tagged for PDF/UA. - Markdown and HTML, both ways. Deterministic export and import over a documented semantic subset; this is not a lossless round trip. The HTML parser implements the WHATWG parsing algorithm rather than approximating it, and diagnostics identify deliberate approximations.
- RTF 1.9.1 as a semantic conversion.
Quillwright.Rtfimports and exports Unicode and code pages, direct character/paragraph formatting, tab stops, breaks and comments without starting Word. - Async-first I/O on the .NET 10 asynchronous
ZipArchiveAPIs, AOT- and trim-safe.
Packages
Current packages target net10.0. Use the .NET 10 SDK to build the examples.
| Package | What it adds |
|---|---|
Quillwright |
The model, reader/writer, streaming, editing, comparison, Markdown and HTML |
Quillwright.Templates |
Typed templating and its incremental source generator |
Quillwright.Doc |
Reading and writing Word 97-2003 .doc files |
Quillwright.Pdf |
Rendering to PDF on top of Inkwright: pagination, tables, tagging |
Quillwright.Rtf |
Semantic import and export of the supported RTF 1.9.1 subset |
Documentation
The guides live in the repository, which is also where the conformance matrix says what is read, written, preserved and evaluated, format by format, with the boundary of each:
- Getting started
- Architecture
- Conformance matrix
- The document model
- Editing, search and revisions
- Rendering to PDF
- Templates
- Loading untrusted input
- Importing RTF
- Exporting RTF
Deliberate limits
The core has no layout engine, so AutoFit is not resolved and a field that needs a layout is
left for Word to recompute; pagination lives in Quillwright.Pdf. SmartArt survives a round
trip but has no API; embedded objects, web extensions and macros are read but never authored,
and a chart is read and its data replaced but never created. Encryption is read four ways and
written one. RTF, Markdown and HTML are semantic conversions in both directions; ODT is not
read or written. Writing
.doc is a conversion rather than a round trip, with a warning naming whatever changed.
Which of these is read, written, preserved or evaluated — and where each one stops — is in the conformance matrix.
Licence
Apache License 2.0 — see LICENSE and THIRD-PARTY-NOTICES.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Quillwright:
| Package | Downloads |
|---|---|
|
Quillwright.Templates
Typed Word templating for Quillwright: fill content controls, {{placeholders}} and MERGEFIELDs from a model, repeat table rows over collections, all through an incremental source generator with no reflection. |
|
|
Quillwright.Doc
Reads legacy Word 97-2003 (.doc) binary documents into the Quillwright model, so they can be inspected or saved as .docx. Implements the [MS-DOC] compound file, piece table and formatting streams directly, with no Office dependency. |
|
|
Quillwright.Pdf
Renders Quillwright Word documents to PDF: pagination of text, tables, lists, sections, headers and footers on top of Inkwright. No Office and no native dependency. |
|
|
Quillwright.Rtf
Imports and exports Rich Text Format (RTF 1.9.1) documents through the Quillwright document model. |
GitHub repositories
This package is not used by any popular GitHub repositories.