Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Web document engine

OfficeIMO.Html

Parse HTML, resolve resources safely, and render web content into OfficeIMO models. Add focused bridges only for MHTML, RTF, email, or PDF workflows.

MIT licensed No Office required Cross-platform .NET
Install dotnet add package OfficeIMO.Html
OfficeIMO managed HTML renderer field guide generated as a PNG from the same scene as the interactive PDF and vector SVG
Managed HTML renderer field guide

The HTML, PDF, PNG, and SVG are emitted by one runnable example. The PDF retains searchable text, named page-margin content, vector gradients, MathML, and four AcroForm fields.

Download interactive PDF · View source · Explore the example

Shared HTML behavior for every converter

Browse the HTML examples for source files, rendered previews, and downloads.

OfficeIMO.Html owns HTML parsing, resource policy, base-URI resolution, accessible structure, layout scenes, and direct image rendering. Word, Excel, PowerPoint, Markdown, and focused bridge packages reuse this owner instead of implementing separate web-content rules.

using OfficeIMO.Html;

HtmlConversionDocument source = HtmlConversionDocument.Parse(
    "<h1>Status</h1><p>Generated by OfficeIMO.</p>");
byte[] png = source.ToPng(new HtmlRenderOptions { ViewportWidth = 720 });

Outputs and projections

  • Render directly to PNG, JPEG, TIFF, SVG, and lossless WebP.
  • Create PDF output with OfficeIMO.Html.Pdf.
  • Convert semantic content to Word and Markdown through their focused adapter packages.
  • Add OfficeIMO.Html.Rtf only for HTML/RTF conversion.
  • Add OfficeIMO.Mhtml for bounded MHT/MHTML load and save, and OfficeIMO.Mhtml.Pdf for archive-to-PDF conversion.
  • Add OfficeIMO.Email.Image only when an email body must be rendered to images.
  • Apply URL, media, size, node, and depth policies before untrusted web content enters a document workflow.
  • Require a no-loss render when a static template must stay inside the declared contract; otherwise every unsupported value remains visible through stable diagnostics.

The static renderer includes paged-media margin content, running elements, page counters, row and column subgrid, basic-shape clipping, vector SVG, tagged-PDF roles, and PDF bookmarks. JavaScript and live browser state remain an explicit browser-adapter concern rather than an automatic fallback.

Same engine, other surfaces

Use OfficeIMO another way

Next step

Turn the package into a working document.

Follow a focused guide and inspect the API reference for this package.

Example source

Download source