Logo
Apdf tutorials August 2026 4 min read

How to Split Bulk PDF Statements by Asking Claude

Every accounting export, payroll run and billing batch has the same shape: one long PDF with everyone's document stacked inside. Sending it on means splitting it — and the usual options are a desktop tool at one range at a time, or a script you'll write, run twice, and lose.

With Apdf connected over MCP, the split is a sentence: describe how the batch is structured, and the agent picks the right page-range expression for the split-pdf-file tool.

What you'll build
A nine-page June statement batch — three clients, three pages each — split into per-client files by one message: “Every statement is 3 pages — one file per client” → three PDFs, seconds later
MCP access needs Pro (14-day trial, no card)
1

Connect Claude to Apdf

One OAuth-signed endpoint, no API keys. In Claude Desktop: Settings → Connectors → custom connector. In Claude Code:

claude mcp add --transport http apdf https://apdf.io/mcp/main
2

Describe the batch, get the files

Point the agent at the export (any publicly reachable URL) and describe the structure instead of the syntax:

You
This June batch has three client statements, three pages each — split it into one file per client:
https://files.northlight.example/exports/statements-june.pdf
Claude
apdf · split-pdf-file
Done — I split it into fixed blocks of three pages. Three files, one per client, each named by its page range (links valid for 1 hour).

Behind the sentence, the agent passed the expression n3 — “every 3 pages” — and got back:

{
    "files": [
        {
            "file": "https://apdf-files.s3.eu-central-1.amazonaws.com/6e6cd55c6a61dab2d0215-1-3.pdf",
            "expiration": "2026-07-23T10:11:14.852345Z",
            "pages": 3,
            "size": 6245
        },
        {
            "file": "https://apdf-files.s3.eu-central-1.amazonaws.com/6e6cd55c6a61dab2d0215-4-6.pdf",
            "expiration": "2026-07-23T10:11:14.852345Z",
            "pages": 3,
            "size": 6246
        },
        {
            "file": "https://apdf-files.s3.eu-central-1.amazonaws.com/6e6cd55c6a61dab2d0215-7-9.pdf",
            "expiration": "2026-07-23T10:11:14.852345Z",
            "pages": 3,
            "size": 6242
        }
    ]
}

The expression language covers the messy real-world cases too: explicit ranges (1-3,4-6,7-9), chunks of any fixed size (n3), and z for “the last page” when you don't know the count (2-z = everything after the cover). You never type it — the agent translates your description.

Heads up: Result files expire after 1 hour — download them or have the agent push them somewhere permanent right away.
3

Get surgical — and let the agent verify

Need just one client? extract-pdf-pages pulls a subset without splitting the rest — and because the agent can also read PDFs, it can check its own work:

You
Just give me Okafor Capital's statement — it's the last three pages. And make sure no other client's data is in the file.
Claude
apdf · extract-pdf-pages, read-pdf-content
Extracted pages 7–9 into a 3-page PDF, then read it back to verify: every page says “Client: Okafor Capital” — nothing from the other statements leaked in.
{
    "file": "https://apdf-files.s3.eu-central-1.amazonaws.com/a6572e616a61da837845f.pdf",
    "expiration": "2026-07-23T10:10:28.033184Z",
    "pages": 3,
    "size": 6806
}

That read-back step matters when the files carry account data — a mis-counted range in a statement batch is a privacy incident, and the agent can rule it out in the same conversation.

Where to go from here

The same connection carries every PDF operation — and the engagement layer behind them.

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