SnapHTML is a utility library built in OutSystems to convert HTML content into downloadable images or Base64 strings using the html2canvas JavaScript library.
It provides easy-to-use client actions to:
Capture DOM elements or HTML strings as images
Output as PNG, JPEG, or WebP
Choose resolution (scale) and background color
Either download the image or return it as Base64Client Actions Overview
CaptureElementToImageDownload
CaptureHtmlToImageDownload
CaptureElementToBase64
CaptureHtmlToBase64
ElementID
CaptureElement...
"myWidget"
HtmlString
CaptureHtml...
"<div>Hello</div>"
Format
"png"
"jpeg"
"webp"
Scale
1.0
10.0
2
BackgroundColor
"#ffffff"
"transparent"
FileName
"my-capture"
ImageBase64
Error
wb_html2canvasLib
html2canvas
The html2canvas library is distributed under the:
Commercial use – You can use html2canvas in commercial applications (e.g., OutSystems apps)