AngleSharp.Renderer 0.2.0

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

logo

AngleSharp.Renderer

CI GitHub Tag NuGet Count Issues Open CLA Assistant

AngleSharp.Renderer extends the core AngleSharp library with some more powerful rendering capabilities. This repository is the home of the source for the AngleSharp.Renderer NuGet package.

Current Status

The project now contains a first draft implementation with:

  • A backend-agnostic rendering core and display-list model
  • A SkiaSharp backend that renders PNG output
  • A basic DOM-driven text layout pass (block flow, heading scaling, word wrapping)
  • Basic support for HTML canvas via a bitmap-backed 2D rendering context

This is an initial vertical slice and not a full browser-grade layout engine yet.

Quick Start

using AngleSharp;
using AngleSharp.Renderer;

var context = BrowsingContext.New(Configuration.Default.WithCss().WithRendering());
var document = await context.OpenAsync(req => req.Content(@"
<html>
	<body>
		<h1>Hello Renderer</h1>
		<p>This is a first draft image render from AngleSharp.Renderer.</p>
	</body>
</html>"));

var renderer = new HtmlRenderer();
var image = renderer.RenderToPng(document, new HtmlRenderOptions
{
		Width = 800,
		Height = 450,
});

await File.WriteAllBytesAsync("render.png", image.Data);

Registering the rendering service with WithRendering() is also what enables support for <canvas> elements and their 2D drawing context. The renderer currently provides a lightweight bitmap-backed implementation for common drawing operations such as rectangles, paths, text, clear operations, and simple state management.

Design Direction

The current architecture is intentionally split into two layers:

  • Core: DOM/CSS integration, layout model, display-list generation
  • Backend: rasterization (currently SkiaSharp)

This keeps future work open for additional backends and interactive rendering scenarios.

.NET Foundation

This project is supported by the .NET Foundation.

License

AngleSharp.Renderer is released using the MIT license. For more information see the license file.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.0 27 7/31/2026
0.2.0-beta.16 25 7/31/2026
0.2.0-beta.14 33 7/31/2026
0.2.0-beta.12 39 7/31/2026
0.2.0-beta.11 30 7/29/2026
0.2.0-beta.10 32 7/29/2026
0.1.0 38 7/28/2026
0.1.0-beta.8 35 7/28/2026
0.1.0-beta.5 37 7/28/2026
0.1.0-beta.4 28 7/28/2026