Tools API Blog
Sign in Create account

Split PDF

Split PDF is an API that separates a PDF into several, by the pages or ranges you specify. Great for pulling out chapters, attachments or loose pages from n8n, Make or Zapier, with no servers to maintain.

How it works

You send a PDF and a list of pages or ranges (for example 1-3,5,7-9) and you get back one PDF per range, all inside the same response. Nothing is stored: it's generated on the fly.

Since the result is several files at once, the response is always JSON with one base64 PDF per requested range (never a single binary PDF, even if you send the input PDF raw).

All you need

  • Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
  • In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).
  • Knowing which pages you want (e.g. 1-3,5,7-9).

How to use it in n8n (step by step)

You send your PDF as is (as binary data, not text) and get the pieces back. In the HTTP Request node:

  • Method: POST
  • URL: https://api.cofferdock.com/pdf-split
  • Send Query Parameters: on, and add ranges = 1-3,5,7-9
  • Send Headers: on → add two: x-api-key = your key, and Content-Type = application/pdf
  • Send Body: on → choose the binary file option (in n8n: "n8n Binary File", picking the binary property that carries your PDF from an earlier step, usually data)

The response is a JSON with one base64 PDF per range. To save them as separate files you need one more step to decode each base64 (for example, a Code node with Buffer.from(item.pdf, 'base64') for each item in files).

In Make (HTTP → Make a request module): same method and URL, add ranges to Query String, the two headers in Headers, Body type: the PDF as binary data (Make offers this when you connect a module that already carries a file, like Google Drive or email).

In short: POST to …/pdf-split, ranges as a Query Parameter, the x-api-key and Content-Type: application/pdf headers, the PDF as binary Body. The response carries one base64 PDF per range.

Options (as Query Parameters)

OptionDefaultWhat it does
ranges-Required. Pages or ranges separated by commas, 1 = first page. E.g. 1-3,5,7-9 produces 3 PDFs: pages 1 to 3, page 5 alone, and pages 7 to 9.

What you get back

A JSON object with one base64 PDF per range you asked for, plus the total page count of the original document.