imgpage

v0.1.0
io.github.CloudCorpRecords/imgpage Checked 5 hours ago Published 21 days ago

Render HTML and CSS to a PNG image or PDF, or screenshot a live web page by URL.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate-image-from-html

Render HTML and CSS into a PNG image, or into an A4 vector PDF with format "pdf". Provide complete, self-contained HTML and put styles in an inline <style> block. Remote image URLs load if they are real and publicly accessible; embed generated or local images as base64 data URIs rather than inventing URLs. Returns the rendered image plus a shareable CDN URL; PDF renders return the URL only. Consumes one credit per call.

ParameterTypeDescription
html *stringThe full HTML markup to render. Include CSS in an inline <style> block. Publicly accessible remote image URLs work; use base64 data URIs for images that are not hosted anywhere.
cssstringOptional additional CSS to inject into the page.
dpiintegerScale factor / device pixel ratio (1-4) for higher-resolution output.
formatstringOutput format. "png" (default) returns an image sized by width and height. "pdf" returns an A4 portrait vector PDF with selectable, searchable text and automatic pagination; width, height, dpi and ful…
fullpagebooleanCapture the full scrollable page instead of just the viewport.
heightintegerViewport height in pixels (1-5000). Defaults to 1080.
ms_delayintegerMilliseconds to wait before capturing (1-5000), e.g. to let fonts or animations settle.
wait_for_selectorstringWait until this CSS selector is present before capturing.
widthintegerViewport width in pixels (1-5000). Defaults to 1920.

screenshot-url

Capture a live web page by URL as a PNG screenshot, or as an A4 vector PDF with format "pdf". Returns the rendered image plus a shareable CDN URL; PDF renders return the URL only. Consumes one credit per call.

ParameterTypeDescription
url *stringThe fully-qualified URL of the page to capture (https://...).
cssstringOptional CSS to inject into the page before capture.
dpiintegerScale factor / device pixel ratio (1-4) for higher-resolution output.
formatstringOutput format. "png" (default) returns an image sized by width and height. "pdf" returns the page as an A4 portrait vector PDF with selectable, searchable text and automatic pagination; width, height,…
fullpagebooleanCapture the full scrollable page instead of just the viewport.
heightintegerViewport height in pixels (1-5000). Defaults to 1080.
ms_delayintegerMilliseconds to wait before capturing (1-5000).
selectorstringCapture only the element matching this CSS selector.
wait_for_selectorstringWait until this CSS selector is present before capturing.
widthintegerViewport width in pixels (1-5000). Defaults to 1920.