In This Topic ▼

File Formats: Hypertext Markup Language (HTM)

Hypertext Markup Language (HTML) is the predominant markup language for web pages. It was created by the World Wide Web Consortium and WHATWG. It is used by the Chrome, Edge, Firefox, Internet Explorer, Opera, and Safari browsers. For more information, refer to https://www.w3.org/.

The default extensions for this format are: .htm, .html, and .xhtml

Support for this file format is available in Document Imaging and above. Unlock RasterSupportType.Document support by calling RasterSupport.SetLicense.

Use this format when you want to rasterize a file. If you want to write HTML, use the LEADTOOLS Document Writer SDK (API or .NET).

LEADTOOLS supports loading this format as a raster image or as an SVG (Scalable Vector Graphics) document.

There are several engines available for loading HTML file format:

  1. WebView2 (Windows-only, requires RasterSupportType.RasterPdfRead or RasterSupportType.PdfAdvanced). This requires the Microsoft WebView2 engine, which comes preinstalled with Windows 10 and 11. The Microsoft WebView2 can also be installed from this Microsoft website link: Download the WebView2 Runtime.
  2. WebKit (Linux, MacOS and Windows)
  3. Internet Explorer (IE) (Windows-only)

You can select the load engine and other HTML load options using the CodecsHtmlLoadOptions.HtmlEngine property.

Some HTML files take a long time because they contain links to web servers that take too long to respond. There are two ways of solving this type of problem:

  1. Abort loads/info requests that take too long using the heartbeat mechanism. See RasterCodecs.FilterHeartbeat for more details.
  2. Specify a whitelist that restrict load requests only to the domains from the whitelist. Set the domain white list in the CodecsHtmlLoadOptions.DomainWhitelist property before calling the load/info function.

File constants associated with this file format are:

Constant Read Support Write Support Description
Htm Yes No HyperText Markup Language

Required DLL: Leadtools.Codecs.Htm.dll (Leadtools.WebKitEngine.dll is optional and required only when using the WebKit engine, for more information, refer to CodecsHtmlEngine). For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

CodecsHtmlLoadOptions

CodecsHtmlLoadOptions.HtmlEngine

CodecsHtmlLoadOptions.DomainWhitelist

RasterCodecs.FilterHeartbeat

WebKit Rendering Engine Support

Platform Support

Extension Module Value Win32 Win64 Net32 Net64 Linux Android Apple UWP MimeType Friendly Name
Htm HTML 369 text/html HyperText Markup Language

For a complete list for supported file formats, see Summary of All Supported File Formats.

For details of the file formats supported across products and platforms, refer to File Format Comparison Chart.

Help Version 23.0.2024.3.4
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.