How do users export from the embed?
Export as PNG, AVIF, PDF, HTML or MP4 directly from the embedded editor.
Updated
Users can download their designs directly from the embed in multiple formats. Turn on Allow Template Download in your embed settings. It is off by default and needs a Grow or Scale plan.
Available Formats#
| Format | Extension | Best For |
|---|---|---|
| PNG | .png | High-quality images with transparency |
| AVIF | .avif | Small image files for the web |
.pdf | Print-ready documents | |
| HTML | .html | Web pages, email templates |
| MP4 | .mp4 | Video pages. Uses render credits |
User Interface#
When downloads are enabled, users see download options in the embed toolbar:
Current Page Options#
- Copy as PNG - Copy the current page to clipboard
- Save as PNG - Download current page as PNG image
- Save as AVIF - Download current page as AVIF image
- Save as PDF - Download current page as PDF document
- Save as HTML - Download current page as HTML file
- Save as MP4 - Download a video page as MP4. Marked "Uses Render Credits"
All Pages Options (when template has multiple pages)#
- Save as PNG - Download all pages as a ZIP file containing PNGs
- Save as AVIF - Download all pages as a ZIP file containing AVIFs
- Save as PDF - Download all pages as a single multi-page PDF
- Save as HTML - Download all pages as a ZIP file containing HTML files
Scale Options#
Users can select the output scale for image exports:
- 1x - Original size
- 2x - Double resolution (recommended)
- 3x - Triple resolution
Programmatic Downloads#
You can also handle exports through your own application using Events.
Request Content From Your Page#
- Keep Allow Template Download on. Content requests fail with "Downloads are disabled" when it is off
- Turn on Enable Events
- Request content programmatically from your parent page
Request Content Example#
const iframe = document.querySelector("iframe");
// Request PNG content
iframe.contentWindow.postMessage(
{
type: "orshot:request:template",
requestId: `req-${Date.now()}`,
format: "png", // png, avif, pdf or html
},
"https://orshot.com",
);
// Listen for response
window.addEventListener("message", (event) => {
if (event.origin !== "https://orshot.com") return;
if (event.data.type === "orshot:template:content") {
const { content, format, mimeType, templateName } = event.data.data;
// content is base64 data URL for images/PDF
// or HTML string for html format
console.log(`Received ${format} content for ${templateName}`);
}
});Download Events#
When users download from the embed, events are fired to your parent page (if events are enabled):
| Event | Description |
|---|---|
orshot:download:png | Downloaded or copied as PNG (single page or ZIP for multi-page) |
orshot:download:avif | Downloaded as AVIF (single page or ZIP for multi-page) |
orshot:download:pdf | Downloaded as PDF (single or multi-page) |
orshot:download:html | Downloaded as HTML (single page or ZIP for multi-page) |
orshot:download:mp4 | A video page downloaded as MP4 |
Event Payload#
// Single page download
{
type: "orshot:download:png",
timestamp: "2024-01-15T10:30:00.000Z",
data: {
templateId: 123,
templateName: "My Design",
pageIndex: 0,
scale: 2,
content: "data:image/png;base64,..."
}
}
// Multi-page download (ZIP or multi-page PDF)
{
type: "orshot:download:png",
timestamp: "2024-01-15T10:30:00.000Z",
data: {
action: "zip", // "zip" for PNG/AVIF/HTML, "multipage" for PDF
templateId: 123,
templateName: "My Design",
pageCount: 3,
scale: 2
}
}
// Copy to clipboard
{
type: "orshot:download:png",
timestamp: "2024-01-15T10:30:00.000Z",
data: {
action: "clipboard",
templateId: 123,
templateName: "My Design",
pageIndex: 0,
scale: 2,
content: "data:image/png;base64,..."
}
}Use Cases#
Track Downloads#
Downloads are already counted per user and per template in the built-in Analytics tab. To also send them to your own analytics tool:
window.addEventListener("message", (event) => {
if (event.origin !== "https://orshot.com") return;
if (event.data.type.startsWith("orshot:download:")) {
const format = event.data.type.replace("orshot:download:", "");
// Track in your analytics
analytics.track("embed_download", {
format,
templateId: event.data.data.templateId,
templateName: event.data.data.templateName,
});
}
});Custom Download Flow#
Process exports through your backend:
window.addEventListener("message", async (event) => {
if (event.origin !== "https://orshot.com") return;
if (event.data.type === "orshot:template:content") {
const { content, format, templateId } = event.data.data;
// Send to your backend for processing
await fetch("/api/exports", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ content, format, templateId }),
});
}
});Configuration#
| Setting | Description |
|---|---|
| Allow Template Download | Show the download menu in the embed. Also needed for content requests and custom export buttons |
| Enable Events | Receive download events via postMessage |
Both settings need a Grow or Scale plan. To export from your own page, turn on both.
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 60+ integrations
- White-label embed for your own app
- 100 free credits a month, no credit card required