Open source · MIT licensed

Generate PDF, HTML, and DOCX Reports in C# and .NET with a Fluent API.

One fluent API family, three professional outputs. Generate real PDF files with zero dependencies, paginated printable HTML without a browser engine — and real Word documents without Word automation.

  • MIT license
  • Zero-dependency core
  • netstandard2.0 → .NET 10
  • Windows · Linux · macOS
SalesReport.cs
var report = ReportDocument.Create(PageSize.A4, PageOrientation.Portrait)
    .SetMargins(40, 40, 60, 60)
    .Header(h => h.AddText("Monthly Sales Report").AlignCenter().Bold())
    .Footer(f => f.AddPageNumber("Page {page} of {totalPages}"))
    .Content(c =>
    {
        c.AddHeading("Sales Summary", HeadingLevel.H1);
        c.AddTable(t =>
        {
            t.AddColumns("Product", "Qty", "Revenue");
            t.AddRow("Widget A", "120", "$2,400");
            t.AddRow("Widget B", "85",  "$1,700");
        });
        c.AddBarcode("INV-2026-0042");
    })
    .Build();

report.RenderHtmlDocument("monthly-sales.html");
Three packages, one mental model

Pick your output. Keep your API.

All three libraries share the same fluent design, so a team that learns one already knows the others.

True PDF

TerraFluent.Pdf.Reporting

Real PDF 1.7 files written by a pure managed C# engine — invoices, reports, and labels with zero dependencies and no native binaries.

  • Column, Row, and Table layouts with repeating headers
  • Code 128 barcodes, QR codes, vector graphics canvas
  • Automatic table of contents, bookmarks, hyperlinks
  • AES-256 encryption with permission flags, by default
dotnet add package TerraFluent.Pdf.Reporting
Print-ready HTML

TerraFluent.Html.Reporting

Paginated, fixed-page HTML reports that view in any browser and print to PDF — PDF-style layout with no PDF engine dependency.

  • Fixed page geometry: A4, Letter, Legal, landscape, custom sizes
  • Repeating headers & footers with page-number templates
  • Line-level pagination, table row splitting, list continuation
  • Native Code 128 barcodes, merged cells, streaming APIs
dotnet add package TerraFluent.Html.Reporting
Native Word

TerraFluent.Docx.Reporting

Real .docx files written directly as Open XML — no Word installation, no COM automation, validated against the Open XML SDK.

  • Invoices, proposals, policy docs, company-branded templates
  • Charts with legends, axis titles, data labels, stacked bars
  • Template placeholder replacement & document protection
  • Vector barcodes, captions, table of figures, image wrapping
dotnet add package TerraFluent.Docx.Reporting
Capabilities

Everything a report needs, built in

No external services, no native binaries — just managed code you can ship anywhere .NET runs.

Fixed page layout

A4, Letter, Legal, portrait or landscape, custom sizes, precise margins.

Native barcodes & QR

Code 128 and QR codes generated in-library — crisp vectors, no external services.

Advanced tables

ColSpan / RowSpan merged cells, styled headers, row-level pagination.

Headers & footers

Repeat on every page with {page} / {totalPages} templates.

Smart pagination

Line-level splitting, numbered-list continuation, controlled page breaks.

Charts & images

Editable Word charts in DOCX, a vector canvas in PDF, images with wrapping and cropping.

Streaming output

Async file rendering and streaming APIs keep large reports memory-friendly.

Extensible by design

Custom elements, renderers, and text-measurement hooks when defaults aren't enough.

Why TerraFluent

Built for teams that ship

No heavyweight engines

No headless browser, no Word COM interop, no native PDF binaries. Pure managed code that deploys cleanly to containers, serverless, and locked-down servers.

Validated, tested output

DOCX output is validated with the Open XML SDK test suite; HTML output carries unit, pagination, and browser-compatibility tests; the PDF writer runs a full multi-framework test suite across .NET 8, 9, and 10.

Documented like a product

Full guides from getting-started to extensibility, a cookbook of recipes, and runnable sample projects in every repository.

FAQ

Frequently asked questions

Is TerraFluent free for commercial use?

Yes. TerraFluent.Pdf.Reporting, TerraFluent.Html.Reporting, and TerraFluent.Docx.Reporting are all MIT licensed — free for personal, commercial, and open-source projects with no page limits, watermarks, or paid tiers.

Can TerraFluent generate PDF files?

Yes. TerraFluent.Pdf.Reporting writes true PDF 1.7 files directly from fluent C# — pure managed code with zero dependencies, including tables, images, barcodes, QR codes, bookmarks, and AES-256 encryption. And TerraFluent.Html.Reporting produces print-ready HTML that saves to PDF from any browser if you prefer an HTML pipeline.

Do I need Microsoft Word installed to generate .docx files in C#?

No. TerraFluent.Docx.Reporting writes Open XML packages directly, so it creates real Word documents without Microsoft Office, Word automation, or COM interop — on Windows, Linux, and macOS, including Docker containers and serverless.

How is TerraFluent.Pdf.Reporting different from iText or QuestPDF?

iText (iTextSharp) is AGPL licensed, which requires a commercial license for most closed-source use, and QuestPDF's free Community tier has a company-revenue cap. TerraFluent.Pdf.Reporting is plain MIT with zero runtime dependencies — free for any commercial use with a fluent, composable, code-first API.

Which .NET versions does TerraFluent support?

TerraFluent.Html.Reporting and TerraFluent.Docx.Reporting target netstandard2.0 and net10.0, so they run on .NET Framework 4.6.1+, .NET Core 2.0+, and every modern .NET release. TerraFluent.Pdf.Reporting targets .NET 8, .NET 9, and .NET 10.

Does TerraFluent run on Linux and in Docker?

Yes. All three libraries are pure managed code with no native binaries, no headless browser, and no Office dependency, so they deploy cleanly to Linux, macOS, containers, Azure Functions, AWS Lambda, and locked-down servers.

How is TerraFluent different from the Open XML SDK?

The Open XML SDK exposes the raw WordprocessingML document model. TerraFluent provides a high-level fluent builder API on top of the same file format — you describe pages, tables, charts, and barcodes in a few chained calls, and the library emits valid Open XML for you.

Start generating reports in minutes

Add a package, write a fluent builder, ship a professional document.