Go to example tasks

Render your own HTML to a PNG image (Open Graph card)

Renders an HTML document you provide, such as an Open Graph or social card, an invoice or a report, to a PNG, JPEG or PDF in a real browser at the size you set. This example renders a 1200x630 social card.

Try for free
Website Screenshot & HTML to Image / PDF
Website Screenshot & HTML to Image / PDFklarto/website-screenshot-pdf
#
Page
Status
Capture
+3 fields
Text
Number
Boolean
List
Object

Input

HTML:<html><body style="margin:0;width:1200px;height:630px;display:flex;align-items:center;justify-content:center;background:#0f172a;font-family:sans-serif"><div style="color:#f8fafc;text-align:center"><div style="font-size:72px;font-weight:700">Your title here</div><div style="font-size:36px;color:#94a3b8;margin-top:24px">Rendered from HTML by Klarto</div></div></body></html>
Format:png
Custom viewport width (px):1200
Custom viewport height (px):630

Output fields

#
Page
Status
Capture
Title
Width
Height

How it works

Sign up on Apify or log in

The Website Screenshot & HTML to Image / PDF Actor is ready to run with the inputs already set for "Render your own HTML to a PNG image (Open Graph card)". Sign up or log in and you'll land in Apify Console with a copy of this exact task.

Start the "Render your own HTML to a PNG image (Open Graph card)" task

The Website Screenshot & HTML to Image / PDF Actor will start running based on the input automatically. You can also change all the input fields, like HTML, format, and more, to match your specific use case.

Receive the "Render your own HTML to a PNG image (Open Graph card)" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as #, page, status, and more.

Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "Render your own HTML to a PNG image (Open Graph card)" task via API.

Image

Integrate "Render your own HTML to a PNG image (Open Graph card)" into your workflow

Connect "Render your own HTML to a PNG image (Open Graph card)" with 100+ integrations, or run it via API or MCP.

Webhook

Webhook

n8n

n8n

Make

Make

Zapier

Zapier

Airbyte

Airbyte

Keboola

Keboola

IFTTT

IFTTT

Hubspot

Hubspot

GDrive

GDrive

Gmail

Gmail

Apify MCP

Apify MCP

GitHub

GitHub

Slack

Slack

LangChain

LangChain

LlamaIndex

LlamaIndex

Flowise

Flowise

Pinecone

Pinecone

OpenAI

OpenAI

Mastra

Mastra

Clay

Clay

Frequently asked questions

The HTML to image task loads images, fonts and styles from public internet addresses; private networks and localhost are blocked for safety.

Rendering HTML to a PNG or JPEG costs $0.003; rendering it to a full page or PDF costs $0.005. Failed renders are free.