Español

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:

What you need

Step by step in the HTTP module

Add the HTTP → Make a request module and set it up like this:

{
  "file": "{{toBase64(1.data)}}",
  "ranges": "1-3,5,7-9"
}

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:

  1. A module that fetches the PDF with the full batch (Google Drive → Download a file, for example).
  2. The HTTP module above, with each invoice's ranges (1-2,3-4,5).
  3. An Iterator module over files to process each result separately.
  4. A Google Drive → Upload a file module that saves each invoice as an individual file, converting its pdf (base64) with toBinary().

One PDF with five invoices goes in, five separate files come out.

Options you can tweak

Add it in the same JSON body:

OptionDefaultWhat it does
outputjsonjson (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.