PDF Toolkit: Merge, Split, Compress & Convert PDFs logo

PDF Toolkit: Merge, Split, Compress & Convert PDFs

by Howth Technology FactoryOfficialGitHubWebsiteUpdated Jul 31, 2026

Merge, split, compress and convert PDFs — plus extract their text — as typed tools. Processed in memory, capped and streamed, nothing stored.

pdf-merge
pdf-split
pdf-compression
+7
|

How to pay

Pick whichever fits your workflow — you can switch any time.

Subscribe

Monthly billing

$19/month

Predictable monthly cost with included usage. Best for steady, high-volume traffic.

  • Unlimited tools within plan limits
  • One API key, billed once a month
  • Cancel any time

Pay-per-call

Agent-native

$0.02 per call

Charge agents in USDC the moment they call a tool. No subscriptions, no signup — pay only for what you use.

  • 5 priced tools available
  • Settled in USDC on Base
  • No account or API key required

PDF Toolkit: Merge, Split, Compress & Convert PDFs

Merge, split, compress, and convert PDFs — plus extract their text — as typed MCP tools an agent or a script can call directly. Every file is processed in memory, capped and streamed, and nothing is stored.

What it does

Five PDF operations, each a single typed tool call: merge multiple PDFs into one, split one PDF into many (by explicit page ranges, a fixed page count per part, or one page per file), compress a PDF structurally, extract each page's text, and build a PDF from a set of images. Every input is supplied as either a public file_url (fetched, streamed, capped at 10MB) or file_base64 (decoded, capped at 10MB) — no uploads, no accounts, no stored files.

Who it's for

Operations and back office. Merge a month's signed delivery notes into one archive file, or split a combined scan into per-invoice documents, without uploading client paperwork to a consumer website.

Finance teams. Compress a folder of statements before attaching them to a filing, with before/after byte counts returned rather than a "compressed!" message.

Developers and AI agents. Call it inside a document pipeline: an agent handling an inbound email can split the attachment, extract the text it needs, and pass it on.

When to use it, and when not to

Use it for structural PDF work — merging, splitting, compressing, extracting text, and building PDFs from images.

Do not use it for OCR, for editing text inside a PDF, or for opening password-protected files. Compression is structural rather than lossy, so an already-optimised PDF may shrink very little; the returned sizes tell you exactly how much.

Why it's built this way

  • Size caps everywhere, honestly enforced — every input file is capped at 10MB and the whole request at 25MB; oversize input is rejected (TOO_LARGE) before any processing starts, never partway through. A result over 8MB is reported by page count and byte size (RESULT_TOO_LARGE) rather than silently truncated.
  • One file at a time, always streamed — multi-file tools resolve each input sequentially, so peak memory never exceeds one file's cap plus what has already been accepted.
  • Honest status, not one generic error — seven distinct statuses, so a caller always knows why something did not come back as a PDF instead of getting the same opaque failure for a bad URL, a corrupt file, and an oversize upload.
  • Structural compression, not oversold — compress_pdf is lossless structural compression only (object-stream re-save plus metadata strip). There is no image re-encoder in this container, so it will not shrink a PDF that is mostly large embedded images the way a desktop compressor might. That is stated plainly rather than oversold.
  • Nothing stored — every file is processed in memory for the duration of one request and discarded.

Status codes

StatusMeaning
OKA result was built and fits the return cap.
INVALID_INPUTBad shape — neither or both of file_url/file_base64, a bad page range, a non-image file.
TOO_LARGEAn input file or the total request exceeded the size caps — rejected before processing started.
RESULT_TOO_LARGEA result WAS produced but exceeds the 8MB return cap; page count and byte sizes are still returned.
UNREACHABLEfile_url could not be fetched.
CORRUPT_PDFThe file is not a valid PDF.
PROCESSING_ERRORAn unexpected failure mid-operation.

TOO_LARGE and RESULT_TOO_LARGE are never confused: one means "we did not even try," the other means "here is what we built, and here is why you do not have it as base64."

Tools

merge_pdfs — merge 2–20 PDFs into one, in the order given.

{ "files": [{ "file_url": "https://example.com/a.pdf" }, { "file_url": "https://example.com/b.pdf" }] }

split_pdf — split by explicit ranges ("1-2|3-5|8"), by everyNPages, or one page per file. Each part over the 8MB cap comes back as metadata only, never failing the other parts.

compress_pdf — structural, lossless compression. Returns bytesBefore and bytesAfter so you can see exactly how much it shrank.

pdf_to_text — extract each page's plain text, capped at 300,000 characters / 500 pages; anything larger returns truncated: true rather than an unbounded string.

images_to_pdf — combine 1–20 PNG/JPEG images into one PDF, one image per page.

FAQ

How do I compress a PDF? Call compress_pdf. It is structural compression only — no image downsampling — so a text-heavy PDF shrinks more than an image-heavy one, and the byte counts tell you honestly how much (if any).

What if my file is bigger than the limit? Files over 10MB (or a request totalling over 25MB) come back as TOO_LARGE immediately — split large jobs into smaller calls.

What if the result is too big to return? A result over 8MB comes back as RESULT_TOO_LARGE with page count and byte size but no base64 blob, since base64 would inflate an already-large file by roughly a third.

Do I need an API key? No — no accounts, no credentials, no stored files.

Trust & limits

Every file is processed in memory for the duration of one request and then discarded — nothing is written to disk or retained between calls. Size caps: 10MB per input file, 25MB total request, 8MB per returned result and per split part, 300,000 characters / 500 pages for extracted text. Compression is structural only, not a substitute for an image-optimizing compressor. This is a processing tool, not a document-management or e-signature system.