Litehtmltopng
The simple render html to png based on litehtml engine (windows helper. Code for all platforms)
Install / Use
/learn @hovlad/LitehtmltopngREADME
litehtmltopng (litehtml engine)
litehtmltopng is simple html render to png image designed to helper the litehtml HTML rendering engine.
Also demonstrated:
- cairo work with freetype
- cairo scaling pictures
Building
You can build litehtmltopng with Vinsual Studio 2008 and newer. Note: this project contais some git submodules:
- freetype - used to draw fonts
- cairo - 2D graphics library
- litehtmlcpp98 - fork litehtml HTML rendering engine
Please be sure the submodules are fetched, or download them from github and copy into libs subfolder.
- litehtmlcpp98 and litehtmltopng should be compiled with define LITEHTML_UTF8 for all platforms
Why fork litehtml?
Used litehtmlcpp98 because while in fork implemented cairo_f container allows minimal commons dependencies for Windows, Linux Embedded, Android and other platforms.
Download binaries
You can download the binary files from freetype cairo
Using litehtmltopng
Before running litehtmltopng copy the files freetype.dll (from libs\freetype) cairo.dll (from libs\cairo) and litehtml.dll (libs\litehtml) into the same folder where litehtmltopng.exe .
Additionally
Basis of the project https://github.com/litehtml/litebrowser
Reference links
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
