TerraFluent.Html.Reporting
1.1.1
Prefix Reserved
dotnet add package TerraFluent.Html.Reporting --version 1.1.1
NuGet\Install-Package TerraFluent.Html.Reporting -Version 1.1.1
<PackageReference Include="TerraFluent.Html.Reporting" Version="1.1.1" />
<PackageVersion Include="TerraFluent.Html.Reporting" Version="1.1.1" />
<PackageReference Include="TerraFluent.Html.Reporting" />
paket add TerraFluent.Html.Reporting --version 1.1.1
#r "nuget: TerraFluent.Html.Reporting, 1.1.1"
#:package TerraFluent.Html.Reporting@1.1.1
#addin nuget:?package=TerraFluent.Html.Reporting&version=1.1.1
#tool nuget:?package=TerraFluent.Html.Reporting&version=1.1.1
TerraFluent.Html.Reporting
TerraFluent.Html.Reporting is a fluent, dependency-free .NET library for building paginated, print-ready HTML reports. It gives you fixed page sizes, headers and footers, measured content flow, table/list pagination, and self-contained HTML/CSS that opens in a browser or can be printed to PDF.
Use it when you want PDF-style report layout without taking a dependency on a
PDF engine. The library targets netstandard2.0 and net10.0.
What's New in 1.1.1
AddBarcode(value, moduleWidthPx, heightPx, quietZoneModules)on content, header/footer, and row-column builders: generates a Code 128 barcode natively as a PNG image - no external barcode library or web service involved. Returns the same image builder asAddImage, so it supports alignment, margin, and padding modifiers. See Content Elements: Barcode and the cookbook recipe.- Table cell
ColSpan/RowSpan, for a merged header/summary cell or a category cell grouping several rows. ARowSpangroup is treated as one atomic unit during pagination - see Tables: Column and row spans and the cookbook recipe.
See CHANGELOG.md for the full release notes.
Install
dotnet add package TerraFluent.Html.Reporting
Quick Start
using TerraFluent.Html.Reporting.Model;
var report = ReportDocument.Create(PageSize.A4, PageOrientation.Portrait)
.SetMargins(40, 40, 60, 60)
.Header(header => header
.AddText("Monthly Sales Report")
.AlignCenter()
.Bold())
.Footer(footer => footer.AddPageNumber("Page {page} of {totalPages}"))
.Content(content =>
{
content.AddHeading("Sales Summary", HeadingLevel.H1);
content.AddParagraph("This report summarizes sales activity for the period.");
content.AddImage("logo.png", widthPx: 120, heightPx: 60);
content.AddTable(table =>
{
table.AddColumns("Product", "Qty", "Revenue");
table.AddRow("Widget A", "120", "$2,400");
table.AddRow("Widget B", "85", "$1,700");
});
})
.Build();
var html = report.RenderHtml();
report.RenderHtmlDocument("monthly-sales.html");
Open the generated HTML in a browser, or use the browser's print dialog to print or save it as PDF.
What It Supports
- Fixed page geometry: A4, Letter, Legal, portrait/landscape, or custom sizes.
- Repeating headers and footers, including page number templates.
- Paragraphs, headings, images, tables, lists, rules, spacers, page breaks, raw HTML, and side-by-side row layouts.
- Natively generated Code 128 barcode images - no external library or web service - handy for an invoice number in the header or a tracking number on a label.
- Table cell
ColSpan/RowSpanfor merged header/summary cells or grouped categories. - Fluent styling for text, margins, padding, alignment, images, rows, and tables.
- Pagination with line-level paragraph splitting, table row splitting, repeated table headers, and numbered-list continuation.
- Layout warnings for content that cannot fit on an empty page.
- Streaming render APIs and async file rendering for larger reports.
- Extension points for custom elements, renderers, and text measurement.
Text Measurement
Pagination depends on measuring text before it is rendered. The built-in
ApproximateTextMeasurer keeps the core package zero-dependency by using
generic character-width tables. It is suitable for many reports, but it is not
a pixel-perfect browser text layout engine.
If page breaks must match a specific rendering engine exactly, implement
ITextMeasurer and pass it to UseTextMeasurer(...) when building the
document.
Documentation
Full documentation and runnable samples live in the GitHub repository:
Status
This library is stable for public use. The current version is 1.1.1. The
default text measurer is approximate; supply a custom ITextMeasurer when
pagination must match a specific rendering engine pixel-for-pixel.
License
TerraFluent.Html.Reporting is licensed under the MIT License. You can use it in personal, commercial, and open-source projects, modify it, and redistribute it, provided the original license notice is included.
| 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 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. |
-
.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.1.1 | 105 | 7/3/2026 |
| 1.1.0 | 98 | 7/3/2026 |
| 1.0.0 | 108 | 6/30/2026 |
| 0.2.0-alpha.1 | 55 | 6/28/2026 |