Inject live data into HTML templates and convert to pixel-perfect PDFs via API. Invoices, dashboards, and compliance reports generated on demand and delivered automatically.
A PDF report generation API converts data-driven HTML templates into professional PDFs on demand, without running wkhtmltopdf, headless Chrome, or any server-side rendering infrastructure. Render your HTML with live data, POST it to the API, and receive a pixel-perfect PDF in milliseconds. Supports custom paper sizes, per-side margins, landscape mode, and background printing.
If it can be rendered in HTML, it can be generated as a PDF via the API.
Render charts and dashboards to PDF for executive summaries, client reports, or board packs.
Generate monthly or quarterly financial PDFs from live data. Always up-to-date, always branded.
Capture compliance audit pages as timestamped PDFs for legal hold and regulatory requirements.
Turn marketing dashboards or SEO reports into downloadable PDFs for your clients on schedule.
Generate structured PDF summaries from healthcare portals. Secure, consistent formatting every time.
Convert project management board views or Gantt charts to PDF snapshots for stakeholder updates.
Use any HTML/CSS stack: Jinja2, Handlebars, EJS, or raw strings. Full CSS support including charts via SVG or Chart.js.
A4, Letter, Legal, or custom dimensions. Portrait or landscape. Custom margins per side. Backgrounds rendered by default.
Get the PDF as a binary blob to stream, a CDN URL to link, or async with a signed webhook when it's ready.
Render your HTML template with live data, then convert to PDF in one API call.
// Generate a PDF report from an HTML template
async function generateReport(data) {
// 1. Build your HTML with real data
const html = renderTemplate('monthly-report.html', {
month: data.month,
revenue: data.revenue,
users: data.users,
chart: data.chartSvg,
});
// 2. Convert to PDF via API
const response = await fetch('https://screenshotcore.com/api/v1/screenshot', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
source: 'html',
html,
format: 'pdf',
pdf_paper_format: 'A4',
pdf_margin: '20mm',
pdf_print_background: true,
pdf_landscape: false,
}),
});
// 3. Store or email the PDF
const pdfBuffer = await response.arrayBuffer();
await uploadToS3(`reports/${data.month}.pdf`, Buffer.from(pdfBuffer));
await emailReport(data.email, `reports/${data.month}.pdf`);
}You render your data into an HTML template using any templating engine (Jinja2, Handlebars, EJS, etc.), then POST the HTML to the screenshot API with format=pdf. The API renders it in a headless browser and returns a pixel-perfect PDF supporting custom paper sizes, margins, landscape mode, and background printing.
The PDF generation API supports A4, Letter, Legal, and custom dimensions. You can set per-side margins (top, right, bottom, left), portrait or landscape orientation, and enable background printing with pdf_print_background=true. Custom paper sizes are supported via pdf_width and pdf_height.
Yes. Pass a URL instead of raw HTML and the API will load the live page and convert it to PDF. This is useful for archiving web pages, generating PDF snapshots of dashboards, or converting published articles to downloadable PDFs.
Set up a cron job or scheduled function that fetches live data, renders it into your HTML template, and POSTs to the PDF API. The API returns the PDF as a binary blob or CDN URL, ready to upload to S3, attach to an email, or stream directly to the user.
100 free PDF generations per month. No credit card required.