TerraFluent.Docx.Reporting 1.4.0

Prefix Reserved
dotnet add package TerraFluent.Docx.Reporting --version 1.4.0
                    
NuGet\Install-Package TerraFluent.Docx.Reporting -Version 1.4.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="TerraFluent.Docx.Reporting" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TerraFluent.Docx.Reporting" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="TerraFluent.Docx.Reporting" />
                    
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 TerraFluent.Docx.Reporting --version 1.4.0
                    
#r "nuget: TerraFluent.Docx.Reporting, 1.4.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 TerraFluent.Docx.Reporting@1.4.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=TerraFluent.Docx.Reporting&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=TerraFluent.Docx.Reporting&version=1.4.0
                    
Install as a Cake Tool

TerraFluent.Docx.Reporting

TerraFluent.Docx.Reporting

NuGet NuGet downloads CI License: MIT

TerraFluent.Docx.Reporting is a fluent .NET library for generating professional .docx files without automating Microsoft Word. It writes Open XML packages directly and is designed for reports, invoices, proposals, policy documents, and company-branded templates.

📚 Full documentation, guides, and samples: 🌐 https://terrafluent.dev/docx/

New in 1.4.0: QR codes encoding arbitrary UTF-8 text as vector shapes with configurable error correction levels and colors. Bug fixes for document protection passwords, column width distribution in rows/tables, watermark visibility and font sizing, theme changes, spacing overrides, strict validation with better error messages, template saving, image format handling, and cross-platform image caching. See the changelog for details.

Install

dotnet add package TerraFluent.Docx.Reporting

Targets netstandard2.0, so it runs on .NET Framework 4.6.1+, .NET Core 2.0+, and every modern .NET release, with a dedicated net10.0 build for the latest runtime.

Quick Start

using TerraFluent.Docx.Reporting;

Document.Create(doc =>
{
    doc.MetadataTitle("Quarterly Report")
       .MetadataAuthor("Northwind Consulting");

    doc.Page(page =>
    {
        page.Size(PageSize.A4);
        page.Margin(Unit.Centimetre(2));
        page.Header().Text("Quarterly Report", t => t.Bold().AlignCenter());
        page.Footer().Text(t =>
        {
            t.Span("Page ");
            t.CurrentPageNumber();
            t.Span(" of ");
            t.TotalPages();
            t.AlignCenter();
        });

        page.Content().H1("Executive Summary");
        page.Content().Text("Revenue improved across every practice.");
    });
}).PublishDocx("quarterly-report.docx");

Feature Examples

Styled Tables

page.Content().Table(table =>
{
    table.CellPadding(5, 7)
         .HeaderBackground(Colors.Blue.L700)
         .AlternateRowBackground(Colors.Grey.L100)
         .HeaderRowMinHeight(24)
         .Border(0.75f, Colors.Grey.L300);

    table.ColumnsDefinition(cols =>
    {
        cols.RelativeColumn(3);
        cols.RelativeColumn(1);
    });

    table.HeaderRow(row =>
    {
        row.Cell().Text("Item", t => t.Bold().FontColor(Colors.White.Default));
        row.Cell().Text("Amount", t => t.Bold().FontColor(Colors.White.Default).AlignRight());
    });

    table.Row(row =>
    {
        row.Cell().Text("Implementation");
        row.Cell().Text("$4,500", t => t.AlignRight());
    });
});

Images

page.Content().Image("logo.png", img => img
    .Width(120)
    .AltText("Company logo")
    .AlignCenter()
    .Caption("Figure 1. Company logo"));

page.Content().Image(bytes, "photo.png", img => img
    .Width(140)
    .WrapSquare(8)
    .FloatRight(8)
    .Border(1, Colors.Grey.L400)
    .Rounded()
    .Crop(4, 4, 4, 4));

Barcodes

page.Content().Barcode("SKU-00100011");

page.Content().Barcode("ACME-99887766", bc => bc
    .Width(220)
    .Height(50)
    .BarColor(Colors.Blue.L700)
    .AlignCenter()
    .Caption("Figure 1. Product tracking code"));

Paragraph Callouts And Page Columns

page.Content().Text("Important policy note.", t => t
    .Shading(Colors.Orange.L100)
    .BorderLeft(4, Colors.Orange.L700)
    .LeftIndent(14)
    .KeepLinesTogether());

doc.Page(page =>
{
    page.Columns(2, spacingPoints: 24, separatorLine: true);
    page.Content().Text("Text flows from the first column into the second.");
});

Templates

DocxTemplate.Open("template.docx")
    .Replace("CustomerName", "Ada Lovelace")
    .ReplaceContentControl("InvoiceTotal", "$1,250.00")
    .SaveAs("output.docx");

Samples

Run the sample project:

dotnet run --project samples\TerraFluent.Docx.Reporting.Sample\TerraFluent.Docx.Reporting.Sample.csproj

Generated documents are written to Desktop\SampleDocs, including invoices, an annual report, template replacement output, and a layout feature showcase.

Documentation

Validation

The test suite validates generated packages with the Open XML SDK:

dotnet test TerraFluent.Docx.Reporting.sln
dotnet pack src\TerraFluent.Docx.Reporting\TerraFluent.Docx.Reporting.csproj -c Release

For application compatibility smoke checks, open the generated sample documents in Microsoft Word and LibreOffice before publishing a release.

License

TerraFluent.Docx.Reporting is a free public library released under the MIT License.

NuGet packages are built with MIT license metadata, README content, XML documentation, and symbols.

Product 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 was computed.  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 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.0 124 8/31/2026
1.3.0 144 7/3/2026
1.2.2 132 7/3/2026
1.2.1 132 6/29/2026