Skip to main content
OfficeIMO Docs Search documentation/

HTML and MHTML

Edit on GitHub

Parse, inspect, render, and safely project web content through the shared OfficeIMO.Html engine.

Install

dotnet add package OfficeIMO.Html

Parse and render

using OfficeIMO.Html;

HtmlConversionDocument source = HtmlConversionDocument.Parse(
    "<h1>Status</h1><p>Generated by OfficeIMO.</p>");

byte[] png = source.ToPng(new HtmlRenderOptions {
    ViewportWidth = 720,
    Scale = 1.5
});

What the shared engine owns

  • HTML and MHTML parsing, DOM traversal, base URI handling, and archive resources.
  • URL and media policy, node/depth/size limits, and image discovery.
  • Accessible structure for headings, code, quotes, footnotes, and EPUB semantics.
  • Continuous and paged layout with PNG, JPEG, TIFF, SVG, and WebP output.
  • Reusable semantic mappings for Markdown, Word, RTF, Email, and PDF adapters.

Install only the adapter needed by the destination, such as OfficeIMO.Word.Html, OfficeIMO.Markdown.Html, or OfficeIMO.Html.Pdf. See the HTML API reference.