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 can be unlocked using the following support constant: L_SUPPORT_DOCUMENT
.
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 either a raster image or as an SVG (Scalable Vector Graphics) document.
There are several engines available for loading this type of files:
WebView2 (Windows-only, requires L_SUPPORT_RASTER_PDF_READ
or L_SUPPORT_PDF_ADVANCED
). This requires the Microsoft WebView2 engine, which comes preinstalled with Windows 10 and 11. It can also be installed from this Microsoft website link: Download the WebView2 Runtime.
WebKit (Linux & Windows)
Internet Explorer (IE) (Windows-only)
You can select the load engine and other HTML load options using the L_SetHtmlLoadOptions function.
Some HTML files take a long time to load because they contain links to web servers that take too long to respond. There are two ways of solving this type of problem:
Abort loads/info requests that take too long using the heartbeat mechanism. See L_SetFilterHeartbeatCallback for more details.
Specify a whitelist that restrict load requests only to the domains from the whitelist. Set the domain white list in FILEHTMLLOADOPTIONS.szDomainWhitelist and pass the FILEHTMLLOADOPTIONS structure to L_SetHtmlLoadOptions before calling the load/info function.
The following file constants are associated with this file format:
Constant | Read Support | Write Support | Description |
---|---|---|---|
FILE_HTM |
Yes | Yes | [369] HTML File Format. |
LEADTOOLS supports writing/saving using LEADTOOLS Document Writers. For additional support details, refer to the following:
Win32, x64, Linux
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document