Logo
POST /api/pdf/page/underlay

PDF Underlay (Background) API

Send your PDF and a letterhead PDF, and get the letterhead placed behind the content of the pages you pick. Made for invoices, letters and branded reports.

  • Free plan
  • No credit card

Request

curl -X POST https://apdf.io/api/pdf/page/underlay \
  -H "Authorization: Bearer TOKEN" \
  -d file="FILE_URL" \
  -d underlay="UNDERLAY_FILE_URL" \
  -d from="3" \
  -d to="2-z" \
  -d repeat="1"

Behind the text.
Never over it.

Your letterhead is drawn first, then your page on top of it. The first page and the pages after it can each get their own.

letterhead.pdf
letter.pdf
POST /api/pdf/page/underlay
branded.pdf from=1 repeat=2
first page
follow-up
follow-up
Your content, on top Letterhead, behind
Common setups with to, from and repeat
repeat=1
A one-page background behind every page
from=1 repeat=2
Letterhead first, follow-up sheet after
to=1
Letterhead on the first page only
to=2-z repeat=1
Every page except the cover
(none set)
Page 1 behind page 1, 2 behind 2, and so on

Design added last.

Keep your templates plain and add the branding in one step. Change the letterhead once and every new document follows.

Invoices on letterhead

Generate plain invoices in your app and place the company letterhead behind them, instead of building it into every template.

Letters and notices

Send contracts, offer letters and notices on the official letterhead, with a lighter follow-up sheet from page two on.

One layout, many brands

Keep one document layout and swap the letterhead per brand, subsidiary or white-label customer when you generate it.

Forms and certificates

Lay the design of a form, voucher or certificate behind the values your app writes, so the result looks like the printed one.

Brand from anywhere.

Add the letterhead right where your documents get made. One account and one monthly allowance behind every route.

Your code

One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.

POST /api/pdf/page/underlay
Open the endpoint docs
Zapier

Pick the action in any Zap and map files from earlier steps. No code and no servers to run.

Underlay PDF
Use it in Zapier
n8n

Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.

Underlay PDF pages
Use it in n8n
AI agents

Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.

underlay-pdf-pages
See what agents can do

1,000 branded PDFs
a month. Free.

Start on the free plan and move up only when your volume does — up to 1,000,000 operations a month on Business.

  • One call is one operation, however many pages.
  • Only calls that do the work are counted.
  • Hard limits, so no surprise overage charges.
Plan PDF operations / month
Hobby Free
$0 / month
1,000
Pro
$39–$99 / month
20,000 – 60,000
Business
$149–$899 / month
100,000 – 1,000,000

Letterheads, answered

Your page is drawn on top of it, so anything solid on your page hides what lies behind. Scans and PDFs that paint a white background cover the letterhead completely.
No. Nothing is moved or reflowed: the letterhead sits behind the page exactly as designed, so keep the margins of your document clear of its header and footer.
A letterhead page that is larger than your page is scaled down to fit and centered. For exact placement, give it the same page size as your document.
As URLs, one for your PDF and one for the letterhead: Apdf downloads both, up to 100 MB per file. In Zapier and n8n you can map the files from earlier steps instead.
The response contains a download URL that stays valid for 60 minutes. Store the file on your side if you need it longer.
After the API call

Your code made the PDF.
Then it went dark.

Opened, read, re-read, dropped on page 4 — you never see any of it. Share the PDFs you generate through Apdf recipient links, and every signal becomes something you can act on: ping Slack, update the CRM, let an agent follow up. Same account, same API token, one more call.

Your PDF, after sending Live
document:loaded CFO
page:read p4 · 38s
link:clicked pricing

API · Webhook · MCP

Your letterhead,
on every PDF you send.