Docs

POST /v1/pdf/merge

Use POST /v1/pdf/merge to combine 2–20 existing PDFs into one file. Convert Office sources with POST /v1/convert first. This is not HTML-to-PDF.

Each file is exactly one of url or file (base64, optional data URI). Temporary RelayPDF URLs from response: "url" (/v1/files/:id) are supported — the Worker reads those from R2 instead of fetching its own origin.

Limits

2 to 20 files. Each source max 15 MB. Office merge is not this endpoint — convert first, then merge PDFs.

Example

URL + base64 mix is supported.

POST /v1/pdf/merge
{
  "files": [
    { "url": "https://example.com/cover.pdf" },
    { "file": "JVBERi0xLjc..." }
  ],
  "filename": "pack.pdf"
}