Design your certificate in HTML and CSS. Inject the recipient's name. One API call produces a pixel-perfect, print-ready PNG. No Canva, no PDF tools, no design software.
Manual tools don't scale. Code-based alternatives compromise on design quality. HTML solves both.
Inject recipient data into an HTML template, POST to the API, receive print-ready PNG bytes.
interface Recipient {
name: string
course: string
date: string
}
export async function generateCertificate(r: Recipient): Promise<Buffer> {
const html = `
<div style="
width:1200px; height:850px;
background:linear-gradient(160deg,#0f172a 0%,#1e1b4b 100%);
display:flex; flex-direction:column;
align-items:center; justify-content:center;
font-family:'Georgia',serif; text-align:center;
border:12px solid rgba(167,139,250,0.4);
box-sizing:border-box; padding:80px;
">
<div style="color:#a78bfa;font-size:14px;letter-spacing:.25em;
text-transform:uppercase;margin-bottom:24px">
Certificate of Completion
</div>
<div style="color:#f8fafc;font-size:52px;font-weight:700;
line-height:1.2;margin-bottom:20px">
${r.name}
</div>
<div style="color:#94a3b8;font-size:20px;max-width:600px;line-height:1.6">
has successfully completed <strong style="color:#e2e8f0">${r.course}</strong>
</div>
<div style="color:#64748b;font-size:15px;margin-top:40px">
Issued ${r.date}
</div>
</div>
`
const res = await fetch('https://api.renderpix.dev/v1/render', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.RENDERPIX_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ html, width: 1200, height: 850, format: 'png' }),
})
const { url } = await res.json()
const img = await fetch(url)
return Buffer.from(await img.arrayBuffer())
}
For bulk generation, loop over recipients and fire concurrent requests — the API is stateless and handles parallel calls without extra config.
How the four most common certificate generation approaches compare.
| Tool | Programmatic & scalable | Full CSS / custom design | Server-side | Serverless-safe | Setup time |
|---|---|---|---|---|---|
| RenderPix | Yes | Yes | Yes | Yes | < 15 min |
| Canva API | Limited | Canva editor only | Yes | Yes | 2–4 hrs |
| html2canvas | No | Partial | No (browser only) | No | 1–2 hrs |
| Puppeteer | Yes | Yes | Yes | No | 2–4 hrs |
Yes. RenderPix renders with headless Chrome at the exact pixel dimensions you specify. For screen use and email delivery, 1200×850 px at 96 dpi is more than sufficient. For print-ready output at 300 dpi, use 3508×2480 px (A4 landscape) or 2480×3508 px (A4 portrait) and scale your CSS accordingly.
Loop over your recipients array and call the render function for each one. The API is stateless and handles concurrent requests — you can fire multiple requests in parallel with Promise.all() to maximise throughput. For very large batches (thousands), process in chunks of 10–20 concurrent requests to stay within your plan's rate limits.
Any width and height you pass in the request body. Common certificate sizes: 1200×850 px (landscape screen), 2480×3508 px (A4 portrait at 300 dpi), 3508×2480 px (A4 landscape at 300 dpi). There's no fixed list — you choose the dimensions per render.
Yes. Reference Google Fonts with a <link> tag or embed a custom font with @font-face. For signature images, use a publicly accessible URL in an <img> tag or embed the image as a Base64 data URI. The renderer waits for all resources to load before capturing.
500 renders costs less than $3 on the Starter plan ($9/month for 2,000 renders). For one-off batch jobs, the free tier gives you 100 renders to test with. If you run multiple cohorts per month, the Starter plan comfortably covers most online course platforms. See the pricing page for details.
Full HTML and CSS support. No Canva, no Puppeteer. Free tier, no credit card required.