Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
- { name: Ubuntu x64, os: ubuntu-24.04 }
- { name: macOS arm64, os: macos-15 }
dotnet:
- { name: .NET 8, version: '8.0.x' }
- { name: .NET 9, version: '9.0.x' }
- { name: .NET 10, version: '10.0.x' }
- { name: .NET 11, version: '11.0.x' }

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Cross framework** (WinForms/WPF/WinUI/PDF/Mono/etc.), **Multipurpose** (UI Controls / Image generation / PDF generation / etc.), **100% managed** (C#), High performance HTML Rendering library.

The library is 100% managed **C#** code without any external dependencies (no WebBrowser control, ActiveX / COM or MSHTML dll), the only requirement is **.NET Standard 2.0 / .NET 8.0 or higher**.
The library is 100% managed **C#** code without any external dependencies (no WebBrowser control, ActiveX / COM or MSHTML dll), the only requirement is **.NET Standard 2.0 / .NET 10.0 or higher**.

![Renderer.png](https://raw.githubusercontent.com/ArthurHub/HTML-Renderer/master/Art/demo_winforms.png)

Expand Down
2 changes: 1 addition & 1 deletion Source/Demo/Common/HtmlRenderer.Demo.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.Demo.Common</RootNamespace>
<AssemblyName>HtmlRendererDemoCommon</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Source/Demo/WPF/HtmlRenderer.Demo.WPF.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.Demo.WPF</RootNamespace>
<AssemblyName>HtmlRendererWpfDemo</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Source/Demo/WinForms/HtmlRenderer.Demo.WinForms.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.Demo.WinForms</RootNamespace>
<AssemblyName>HtmlRendererWinFormsDemo</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Source/Demo/WinUI/HtmlRenderer.Demo.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<OutputType>WinExe</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.Demo.WinUI</RootNamespace>
Expand Down
4 changes: 3 additions & 1 deletion Source/HtmlRenderer.PdfSharp/HtmlRenderer.PdfSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.PdfSharp</RootNamespace>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
Expand Down Expand Up @@ -34,6 +34,8 @@ Features and Benefits:
</ItemGroup>
<ItemGroup>
<PackageReference Include="PDFsharp" Version="6.2.4" />
<!-- PDFsharp depends on 8.0.1, which has known vulnerabilities -->
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.15" />
</ItemGroup>
<ItemGroup>
<None Remove="FontResolver\Fallback\Tuffy.ttf" />
Expand Down
2 changes: 1 addition & 1 deletion Source/HtmlRenderer.WPF/HtmlRenderer.WPF.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-windows;net462</TargetFrameworks>
<TargetFrameworks>net10.0-windows;net462</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.WPF</RootNamespace>
<UseWPF>true</UseWPF>
Expand Down
2 changes: 1 addition & 1 deletion Source/HtmlRenderer.WinForms/HtmlRenderer.WinForms.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-windows;net462</TargetFrameworks>
<TargetFrameworks>net10.0-windows;net462</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.WinForms</RootNamespace>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
2 changes: 1 addition & 1 deletion Source/HtmlRenderer.WinUI/HtmlRenderer.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<OutputType>Library</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer.WinUI</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion Source/HtmlRenderer/HtmlRenderer.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
<OutputType>Library</OutputType>
<RootNamespace>TheArtOfDev.HtmlRenderer</RootNamespace>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Source/Test/HtmlRenderer.IntegrationTest/Baselines/Images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
return;
}

SamplesLoader.Init("Regression", typeof(HtmlRender).Assembly.GetName().Version.ToString());

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Ubuntu x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / macOS arm64 .NET 11

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 10

Dereference of a possibly null reference.

Check warning on line 137 in Source/Test/HtmlRenderer.IntegrationTest/HtmlRenderingRegressionTests.cs

View workflow job for this annotation

GitHub Actions / Windows x64 .NET 10

Dereference of a possibly null reference.

// Baselines are captured once on some machine and compared everywhere after; a sample driven
// by prefers-color-scheme must not depend on whichever machine happens to run the test having
Expand Down Expand Up @@ -235,6 +235,12 @@
return true;
}

// The renderer decodes these itself, and Uri.TryCreate only fails on a long one up to .NET 9
if (src.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
{
return false;
}

if (Uri.TryCreate(src, UriKind.Absolute, out var uri))
{
return uri.Scheme != Uri.UriSchemeFile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion Source/Test/HtmlRenderer.Test/HtmlRenderer.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Loading