Installation

NuGet Package (HtmlForgeX)

dotnet CLI

dotnet add package HtmlForgeX

Package Manager Console

Install-Package HtmlForgeX

NuGet Package (HtmlForgeX.Email)

dotnet add package HtmlForgeX.Email

NuGet Package (HtmlForgeX.Markdown)

dotnet add package HtmlForgeX.Markdown

ASP.NET Core Integration

dotnet add package HtmlForgeX.AspNetCore

PowerShell Module

Import-Module .\Module\HtmlForgeX.psd1

Public PowerShell Gallery publishing is not active yet. If you use the PowerShell module today, import it from the repository or your private distribution source.

Supported Frameworks

FrameworkHtmlForgeXHtmlForgeX.Email
.NET 8.0YesYes
.NET Framework 4.7.2YesYes
.NET Standard 2.0YesYes
.NET 9.0Yes
.NET 10.0Yes

Prefer the dotnet add package form so NuGet resolves the newest stable release for each package instead of copying a stale version number from documentation.

Verify Installation

using HtmlForgeX;

var doc = new Document();
doc.Body.Page(page => {
    page.Text("Hello from HtmlForgeX!");
});
doc.Save("test.html");
Console.WriteLine("HtmlForgeX is working!");

After running this code, open test.html in your browser to verify the installation.

API Reference