PDF Generation API

Render templates to print-ready PDF and assemble multi-page documents via API or AI tools

fetch('https://api.bannerbear.com/v5/images', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${API_KEY}` },
  body: { format: "pdf" }
})

Get Started for Free

Generate PDFs by API

Render any template straight to a print-ready document, or stitch pages together into one file. No separate template and no conversion step afterwards.

Key Features

  • Full API Documentation
  • 50+ native integration, 9,000+ via Zapier
  • Custom templates
  • Embed a print DPI between 72 and 600
  • Import your templates from Figma
  • Merge up to 50 files into a multi page doc
  • 1000+ fonts available, add your own custom fonts

REST API Docs

Fully documented API with OpenAPI specs. Everything you or your coding agent needs to get up and running fast.

API Reference

Node

Add template-based image and video generation capability to your Node app. Copy and paste your API key from the dashboard.

Python

Grab an API key from the dashboard and add template-based image and video generation capability to your Python app.

More Libraries

Ruby, PHP, MCP hosted and local. There are many more ways to integrate your tech stack with Bannerbear.

Libraries & SDKs →

99.9% Uptime

12 month trailing 99.9% uptime. 6 years providing image and video API services. Check our current status.

API Status

SepOctNovDecJanFebMarAprMayJunJulAug

Template To PDF

Ask any image template for pdf and the same design comes back as a print-ready document.

Print DPI

Embed a DPI between 72 and 600 so print software reads the physical size correctly.

Multi-Page Merge

Combine up to fifty JPGs, PNGs and PDFs into a single document, order preserved exactly.

Mixed Inputs

Pages can be freshly rendered images or PDFs you already hold, combined in the same job.

Resolution Scaling

Multiply the rendered size for large-format output, without maintaining a second template at print dimensions.

Alongside Images

Request pdf and jpg from one render, so print and web assets stay identical to each other.

Workflow Assembly

Render pages as workflow steps, then merge them, producing a finished document in one call.

Template Versioning

Pin a document to a template version, so a redesign never alters a contract already issued.

PDF API FAQ

Rendering templates to PDF, and assembling multi-page documents.

How do I generate a PDF?

Render an image template and ask for pdf in the formats array. It is the same request as a JPG — only the format differs.

Do I need a separate template for PDF output?

No. Any image template can return a PDF, so one design serves both a social post and a printable document.

Can I get a PDF and an image from one request?

Yes. Pass several formats and the same render returns all of them, so your print and web assets match rather than being generated separately.

How many credits does a PDF cost?

One, the same as any other format. Asking for pdf and jpg together costs two, because credits are counted per format.

How do I set the DPI?

Pass dpi with the request, between 72 and 600. It writes DPI metadata so print software reads the physical size correctly.

What is the difference between dpi and scale?

scale changes the actual pixel dimensions; dpi only changes the metadata describing how large those pixels should print.

How do I make a PDF print at a specific physical size?

Design the template at the pixel size you need, then set the DPI that maps those pixels to your target dimensions.

Can I create a multi-page PDF?

Yes, with the Create multi-page PDF tool. Give it a list of URLs and it returns one document with a page per item.

What can go into a multi-page PDF?

JPGs, PNGs and existing PDFs, mixed freely in one job. Images become a page each; PDFs contribute all of their pages.

How is page order decided?

By the order of the URLs you supply. Nothing is sorted or rearranged, so the list is the document.

How many items can I merge at once?

Fifty URLs per job. A longer document means merging in stages, or merging the results of earlier merges.

How much does merging cost?

One credit per job, however many pages go in. The renders that produced those pages are billed separately.

Can I merge PDFs I did not generate with Bannerbear?

Yes. Any reachable PDF URL can be a page, so covers and terms pages you already hold can be included.

Can I render pages and merge them in one go?

Yes. Render each page as a workflow step, then add a merge step referencing those outputs, producing a finished document in one call.

How do I stop a template edit changing documents I have already issued?

Pin the version. A render can target a specific saved template version, so redesigning it never alters an invoice already sent.

Does the transparent option work with PDF?

Transparency is carried by PNG and WebP. For a PDF, design the background you want rather than relying on an alpha channel.

Will my fonts render correctly?

Yes. Fonts uploaded to your workspace are used at render time, so a document looks the same wherever it is opened.

Is PDF generation immediate?

A render is queued like any other, then collected by webhook or polling. Merging is a tool job and reports progress while it runs.

What do people build with this?

Invoices, certificates, tickets, reports and proposals — anything where the layout is fixed and the data changes per document.

Start a Free Trial

Start a free trial with 30 API credits, no credit card required

Resize Video
Add Intro Animation
Add Subtitles

Get Started for Free