Skip to content

westermo/html-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Jörgen Sigvardsson
Nov 1, 2021
b824005 · Nov 1, 2021
Nov 1, 2021
Nov 1, 2014
May 24, 2017
Nov 1, 2021
Sep 16, 2013
Oct 26, 2021
Nov 1, 2021
Nov 1, 2021
Nov 1, 2021
Nov 1, 2021
Sep 16, 2013

Repository files navigation

HTML Renderer

Westermo Fork

Code was forked from https://github.com/ArthurHub/HTML-Renderer, and this fork is maintained for .NET 6. A product at Westermo was dependent on the original package. As the product evolved, and was ported to .NET 6 (the continuation of .NET Core), the package had to be recompiled to not lock onto the .NET Framework. The result is a library that targets .NET 6 Windows. As such it may now safely be used with applications targeting .NET 6 on Windows.

Westermo does not actively develop this package, but does not oppose collaboration. Even though the package is fairly complete, PRs are welcome should they benefit any users of Html-renderer.

The namespace has been prefixed with Westermo.

The PdfSharp renderer is no longer compiled, as it has a dependency that has not been ported from .NET Framework to .NET. This package is not used by Westermo. Feel free to submit a PR!

Original README.md

Help Wanted

  • Looking for a contributor(s) to take this project forward as I'm unable to continue supporting it.
  • Contribute directly to the repository and update nuget packages.

Documentation, Discussion and Issue tracking is on CodePlex.

Cross framework (WinForms/WPF/PDF/Metro/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 2.0 or higher.

Download the Demo application to explore HTML Renderer capabilities.

Renderer.png

Features and Benefits

  • Extensive HTML 4.01 and CSS level 2 specifications support.
  • Support separating CSS from HTML by loading stylesheet code separately.
  • Support text selection, copy-paste and context menu.
  • WinForms controls: HtmlPanel, HtmlLabel and HtmlToolTip.
  • WPF controls: HtmlPanel and HtmlLabel.
  • Works on Mono.
  • Create images/PDFs from HTML snippets.
  • Handles "real world" malformed HTML, it doesn't have to be XHTML.
  • 100% managed code and no external dependencies.
  • Supports .NET 2.0 or higher including Client Profile.
  • Lightweight, just two DLLs (~300K).
  • High performance and low memory footprint.
  • Extendable and configurable.
  • Powerful Demo application to explore and learn the library.

WinForms/WPF controls

  • HtmlPanel - The full power of HTML control build to replace WebBrowser control, accepts HTML, text selection, scrollbars, link click intercept, image load intercept and much more.
  • HtmlLabel - As WinForms label but accepts HTML, text selection, auto-size capabilities, transparent background and more.
  • HtmlToolTip - As WinForms ToolTip control but accepts HTML and ability to handle links (WinForms only).

Sample application's

  • Render HTML content generated by rich web editors like forums, blogs, etc.
  • Render Office documents converted to HTML.
  • Create WinForms UI that requires text selection with clipboard support.
  • Create images from HTML code snippets.
  • Create PDF document from HTML code snippets.

NuGet packages

HTML Renderer on my blog

TheArtOfDev / HTML Renderer