PDF Merger & Splitter: Merge, Split, Extract Pages avatar

PDF Merger & Splitter: Merge, Split, Extract Pages

Pricing

from $3.20 / 1,000 pdf output files

Go to Apify Store
PDF Merger & Splitter: Merge, Split, Extract Pages

PDF Merger & Splitter: Merge, Split, Extract Pages

PDF merger and PDF splitter for URLs: merge PDF files in order, split PDF every N pages or by ranges, extract pages from PDF, rotate and reverse pages. Password-protected PDFs supported. Every result gets a direct download link, page count and size.

Pricing

from $3.20 / 1,000 pdf output files

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

PDF Merger & Splitter: Merge PDF Files, Split PDF, Extract Pages

This Actor is a PDF merger and PDF splitter for automations and AI agents. Give it PDF links (or PDF records from an Apify key-value store) and it will merge PDF files into one, split a PDF by page count, page ranges or one file per page, extract pages from a PDF, rotate pages, or reverse the page order. Every result PDF is saved and returned with a direct download link, its page count and its size.

It works on public URLs and on your own files, handles password-protected PDFs when you supply the password, and never lets one bad file stop the rest of the run.

What can it do

OperationWhat you get
mergeAll input PDFs joined, in the order you list them, into one PDF. Optional page range per file, e.g. 1-3,5.
splitEach input PDF cut into several PDFs: every N pages, by page ranges (1-3,4-6,7-), or one file per page.
extractA new PDF with only the pages you name, per input file. The order you write is kept, so 5,1-3 also reorders pages.
rotateSelected pages (or all) turned 90, 180 or 270 degrees clockwise.
reverseThe same PDF with its pages in reverse order.

How to merge PDF files

{
"operation": "merge",
"urls": [
"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"https://pdfobject.com/pdf/sample.pdf"
],
"filePageRanges": ["", ""],
"outputFileName": "bundle.pdf"
}

Files are merged in the order of urls. Use filePageRanges to take only some pages of a file (one entry per URL, empty = all pages). If any input cannot be downloaded or opened, nothing is merged and the row names the failing file, so you never get a silently incomplete PDF. Turn on skipBadFiles to merge the readable files instead; skipped ones are listed in warnings.

How to split a PDF

{ "operation": "split", "splitMode": "everyN", "splitEvery": 10,
"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"] }
  • splitMode: "everyN" with splitEvery: a 45-page file with N=10 gives 5 PDFs.
  • splitMode: "ranges" with pageRanges: "1-3,4-6,7-": each comma-separated range becomes its own PDF (use + to join pages in one file, e.g. 1+9).
  • splitMode: "eachPage": one PDF per page.

Output names look like fw9_part-001.pdf, fw9_part-002.pdf.

How to extract pages from a PDF

{ "operation": "extract", "pageRanges": "6,1-2", "urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"] }

Page ranges: 5 (one page), 1-3, 4- (page 4 to the end), last, 5-1 (pages 5 down to 1), combined with commas. A page outside the file gives a clear error for that file, e.g. "page 12 is outside this PDF, which has 10 pages".

How to rotate or reverse PDF pages

{"operation": "rotate", "rotateAngle": "90", "pageRanges": "2-4", "urls": [...]} rotates only pages 2 to 4 (leave pageRanges empty for all pages). {"operation": "reverse", "urls": [...]} reverses the page order.

Password-protected PDFs

Add the password input (stored as a secret). It is tried on every file; for a different password per file, give the URL as an object when you call the Actor by API: {"url": "https://...", "pages": "1-2", "password": "..."}. A missing or wrong password gives a clear error for that file only. The Actor never tries to crack or guess passwords. Results are saved without encryption.

Use your own files (key-value store)

Set keyValueStoreId to one of your key-value stores and list recordKeys (for example PDFs saved by another Actor). They are added after the URLs, in order.

Output

One dataset row per result PDF (and one failed row per input that could not be processed):

{
"fileName": "merged.pdf",
"url": "https://api.apify.com/v2/key-value-stores/.../records/0001-merged.pdf?signature=...",
"pages": 2,
"bytes": 28020,
"sourceFiles": ["https://www.w3.org/.../dummy.pdf", "https://pdfobject.com/pdf/sample.pdf"],
"operation": "merge",
"status": "ok",
"error": null,
"kvKey": "0001-merged.pdf",
"pageRange": null,
"warnings": null
}

url is a signed link that downloads without an API token. Result PDFs are stored in the run's key-value store, which Apify deletes after your plan's data-retention period; set keyValueStoreName to keep them in a named store. Problems are also collected in a FAILED record.

How much does it cost

$0.004 per result PDF (pay per event pdf-output). A merge counts as one, a split into 5 parts counts as five. Failed inputs are free. There is no start fee and no per-page fee. maxOutputFiles (default 100) caps the cost of a run, and the Actor stops cleanly if your spending limit is reached. Platform usage is small: a typical job runs for a few seconds.

Limits (honest)

  • Input files are downloaded with a hard cap (maxFileSizeMb, default 50, max 500) and maxPagesPerFile (default 1000). Larger files fail with a clear message.
  • The Actor changes page structure only: it does not compress, OCR, flatten forms or add watermarks. Interactive form fields, bookmarks and links that point to pages left out may not survive a split or extract. Document title and author are kept for single-file operations.
  • It does not crack passwords, and it does not read pages behind a login (use a direct PDF link).
  • Scanned PDFs are merged and split fine (pages are copied as they are); text is not extracted.

FAQ

How do I merge PDF files online without uploading them manually? List their public URLs (or key-value store record keys) in urls, run the Actor, and download the merged PDF from the url field.

Can I merge only some pages of each PDF? Yes. Use filePageRanges, for example ["1-3,5", "", "2-"] for three files.

How do I split a PDF into single pages? Use operation: "split" with splitMode: "eachPage". You get one PDF per page (and one charge per page file).

Does it work with password-protected PDFs? Yes, if you provide the password. The result is saved without a password. Without the right password, that file fails with an error and the other files are still processed.

Is there a file size limit? Default 50 MB per input file, up to 500 MB, set by maxFileSizeMb. Memory is 1 GB by default, so very large merges may need more memory.

Can I call it from code or an AI agent? Yes: use the Apify API, the Apify client libraries, or the Apify MCP server. The input is plain JSON, and the output includes ready-to-use download links.

  • Extract Zip Files: unzip archives and pull attachments out of emails and PDFs.
  • PDF to Text & OCR: turn PDF pages into text, including scanned documents.
  • Bulk File Downloader: download many files from a list of links before you merge them.