Lee este artículo en español.
How to split a PDF in Make (by page ranges)
Updated
If you work with Make, sometimes you get a PDF that's really several documents bundled together: a batch of scanned invoices, a dossier with several appendices, or a report that needs to be split by section. With the HTTP module and the Cofferdock API, you split it by page ranges in one step.
An honest heads-up: Make has no built-in "split PDF" module. You do it with the generic HTTP module calling an API that you give the ranges to, and it returns one file per range.
What you'll get
You send the PDF and the page ranges you want (for example 1-3,5,7-9, which gives three files) and get back one PDF per range. To get one file per page, just list them all: 1,2,3.
Common uses in Make:
- Splitting a batch of scanned invoices into one PDF per invoice.
- Splitting a dossier into its individual appendices before filing them.
- Extracting just a range of pages from a long report.
What you need
- A Cofferdock account. The free tier gives you 50 uses/month with no card.
- Your API key, from your dashboard with "+ Create key". It's shown only once.
- The input PDF, available from an earlier module in the scenario.
- The HTTP → Make a request module in your scenario.
Step by step in the HTTP module
Add the HTTP → Make a request module and set it up like this:
- URL:
https://api.cofferdock.com/pdf-split - Method:
POST - Headers: add two →
x-api-keywith your key, andContent-Typewith the valueapplication/json. - Body type:
Raw - Content type:
JSON (application/json) - Request content:
{
"file": "{{toBase64(1.data)}}",
"ranges": "1-3,5,7-9"
}
- Turn on Parse response: this tool's output is always a JSON with one file per range, never a single binary.
The response includes files, a list with one object per range (range, pages, pdf in base64, size_bytes). To save each one as a real file, use an Iterator module over files and the toBinary() (or toFile(), depending on the destination module) function on each item's pdf field.
A quick example
Say you split a batch of scanned invoices out of a single PDF:
- A module that fetches the PDF with the full batch (Google Drive → Download a file, for example).
- The HTTP module above, with each invoice's ranges (
1-2,3-4,5). - An Iterator module over
filesto process each result separately. - A Google Drive → Upload a file module that saves each invoice as an individual file, converting its
pdf(base64) withtoBinary().
One PDF with five invoices goes in, five separate files come out.
Options you can tweak
Add it in the same JSON body:
| Option | Default | What it does |
|---|---|---|
output | json | json (each file in base64) or url (a 15-minute temporary link per file, lighter if you're going to download them afterward). |
Prefer to see it in code?
The same call with curl, with the PDF already in base64:
curl -X POST "https://api.cofferdock.com/pdf-split" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"file": "BASE64_OF_THE_PDF", "ranges": "1-3,5,7-9"}'
How much does it cost?
Each split uses 1 credit from your plan, no matter how many files come out. Every Cofferdock tool draws from the same pool of credits.
FAQ
Does Make have a native module to split PDFs? No. You do it with the generic HTTP module calling the Cofferdock API.
Why is the response always JSON? Because the result is several files, not one. That's why each one travels as base64 inside the JSON (or as a link, with output: "url").
How are pages numbered? Starting at 1, not 0. 1-3 is the first three pages.
Can I get one file per page? Yes, by listing every page separated by commas: 1,2,3,4,5.
Related guides
Try it yourself
You'll find the full instructions, with copy-paste examples, on the split PDF page. And if you don't have an account yet, you can create one for free and build your first scenario today.