Introduction
Generate production-ready PDFs from your templates with full control over margins, page ranges, color modes, DPI, and interactive links.
Orshot generates high-quality PDFs from your Studio templates — perfect for certificates, invoices, reports, tickets, and print-ready materials. Set response.format to pdf and use pdfOptions to control output quality and formatting.
Quick Start#
To generate a PDF, set the response.format to "pdf" in your API request:
const response = await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<YOUR_TEMPLATE_ID>",
modifications: {
recipient_name: "Jane Smith",
certificate_title: "Course Completion Certificate",
date: "March 25, 2026",
},
response: {
format: "pdf",
type: "url",
},
}),
});
const data = await response.json();
console.log(data.data.content); // PDF URLHow It Works#
- Design a template in Orshot Studio — the same template can render as an image or PDF
- Call the API with
response.format: "pdf"and any content overrides - Receive your PDF as a hosted URL or binary data
The same template that generates a PNG social post can generate a PDF document — just change the format.
API Request Structure#
| Field | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | Your Studio template ID |
modifications | object | No | Content overrides |
response.format | string | Yes | Set to "pdf" |
response.type | string | No | "url" or "binary" |
response.scale | number | No | Scale factor for output size |
response.fileName | string | No | Custom filename (without extension) |
pdfOptions | object | No | PDF-specific settings (margin, DPI, color mode, page range) |
PDF Options#
Use the pdfOptions object to fine-tune your PDF output:
{
"templateId": "<YOUR_TEMPLATE_ID>",
"modifications": {
"title": "Quarterly Report"
},
"response": {
"format": "pdf",
"type": "url"
},
"pdfOptions": {
"margin": "20px",
"dpi": 300,
"colorMode": "rgb",
"rangeFrom": 1,
"rangeTo": 3
}
}| Option | Type | Default | Description |
|---|---|---|---|
margin | string | "0px" | Margin around the PDF content (CSS value) |
dpi | number | 72 | Resolution — use 300 for print quality |
colorMode | string | "rgb" | Color mode: "rgb" for screen, "cmyk" for print |
rangeFrom | number | null | Start page (for multi-page templates) |
rangeTo | number | null | End page (for multi-page templates) |
Response#
The response structure is the same as image generation:
{
"data": {
"content": "https://storage.orshot.com/cloud/renders/pdfs/invoice-001.pdf",
"renders": 1,
"mimeType": "application/pdf"
}
}Common Use Cases#
Certificates#
const response = await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<CERTIFICATE_TEMPLATE>",
modifications: {
recipient: "Alex Johnson",
course: "Advanced JavaScript",
date: "March 25, 2026",
certificate_id: "CERT-2026-001",
},
response: {
format: "pdf",
type: "url",
fileName: "certificate-alex-johnson",
},
pdfOptions: {
dpi: 300,
},
}),
});Invoices#
await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<INVOICE_TEMPLATE>",
modifications: {
invoice_number: "INV-2026-0042",
client_name: "Acme Corp",
amount: "$2,450.00",
due_date: "April 15, 2026",
cta_button: "Pay Now",
"cta_button.href": "https://pay.example.com/inv-0042",
},
response: {
format: "pdf",
type: "url",
},
}),
});Event Tickets#
await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<TICKET_TEMPLATE>",
modifications: {
event_name: "Tech Conference 2026",
attendee: "Sarah Chen",
seat: "Row A, Seat 14",
qr_code:
"https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=TICKET-001",
},
response: {
format: "pdf",
type: "url",
},
}),
});Print-Ready PDFs#
For professional printing, use high DPI and CMYK color mode:
{
"response": {
"format": "pdf",
"type": "url"
},
"pdfOptions": {
"dpi": 300,
"colorMode": "cmyk",
"margin": "0px"
}
}CMYK color mode ensures accurate color reproduction when printing. Use it for business cards, flyers, and other print materials.
What's Next#

All Set? Let's Start Automating
- Image, PDF and Video Generation via API
- Canva like editor with AI and smart features
- No-Code Integrations (Zapier, Make, n8n etc.)
- Embed Orshot Studio in your app
- Start Free. No credit card required. Cancel anytime.