PDF Tools - Merge, Split, Compress, Rotate & Extract in Bulk
Pricing
from $1.60 / 1,000 files
PDF Tools - Merge, Split, Compress, Rotate & Extract in Bulk
Merge PDFs, split them into pages or ranges, extract or rotate pages, compress and read PDF info, from links or another Actor's dataset. Results are files with public links. Built for n8n, Make, Zapier and AI agents.
Pricing
from $1.60 / 1,000 files
Rating
0.0
(0)
Developer
Northbell
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Merge, split, extract, rotate and compress PDF links in bulk, or read their page count and metadata. Give it direct links to PDFs (or a dataset from another Actor) and get result PDFs back as files with public links, one dataset row per file. One bad PDF never fails the run: it becomes a row with a plain error message, and the rest carry on.
Try it now — the input is already filled in. Press Start. It splits two US government forms (IRS Form W-9, 6 pages, and IRS Form 1040, 2 pages; US federal government publications, public domain) and keeps pages 1-2 of each. In our own local run with this input (22 Nov 2026): 2 PDFs in (140,815 and 220,237 bytes), 2 PDFs out (40,262 and 112,464 bytes), about 7 seconds including the downloads. That is 2 output files: $0.004 (plus $0.00005 for the run start). Merging the same two forms into one 8-page PDF took about 16 seconds and came out at 168,657 bytes.
What you pay
| Event | Price | When |
|---|---|---|
file | $0.002 | per output PDF stored (a merged file, each split part, an extracted, rotated or compressed file) |
info | $0.0003 | per PDF read with the info operation |
apify-actor-start | $0.00005 | once per run |
- You are charged for a file only after it is saved. Errors, rejected links, files skipped by "Only new files", and a compress that could not make the file smaller are free.
- A split that makes 10 parts is 10 files, $0.02.
- Set "Maximum total charge" on the run as your cap. The Actor checks the charge limit before it stores each file and stops cleanly when the next one does not fit.
Operations
operation | What it does |
|---|---|
merge | All links (in the order given) become one PDF. A link that fails gets an error row and is left out; the others still merge. |
split | Each PDF becomes several files: one per range in ranges (1-3,5,7-), else one per everyN pages, else one per page. |
extract | Keeps the pages listed in pages, in the order written, as one new PDF. |
rotate | Turns the pages in pages (all pages if empty) by rotateDegrees (90, 180 or 270), added to the rotation they already have. |
compress | Re-saves the file with object streams and, if you leave compressLevel on ebook, screen or printer, downsamples images with Ghostscript. The smallest result wins. If nothing is smaller than the original, the original is kept: the row says unchanged, nothing is stored and nothing is charged. |
info | One row per PDF: page count, size in bytes, title, author, subject, creator, producer, PDF version and whether it is encrypted. |
Page lists use 1-based numbers: 1-3,5,7- means pages 1 to 3, page 5, and page 7 to the end. A page that does not exist (page 9 of a 5-page file) is an error row for that file, free. A list that cannot be read (5-3, 0, a) stops the run before anything is charged.
Password-protected PDFs are not supported. Every operation except info returns an error row for them ("password-protected PDFs are not supported"), free. info still answers, with encrypted: true, and charges its normal price.
Built so that runs finish
- A timeout on every file. Downloads give up after 20 seconds without data or 60 seconds in total; download plus PDF work is cut off at 240 seconds. A hung server costs you one error row, not the run.
- Retries. A 429, a 5xx answer or a dropped connection is tried again twice (after 1 and 3 seconds, or the server's
Retry-Afterup to 10 seconds). A 404, a login page or a corrupt file is an error straight away. - Errors are rows. Each failed file gets
status: "error"and a sentence that says why (for example "The server answered 404." or "The file is not a PDF"). The run still ends as succeeded. - Bounded parallelism. 3 files at a time. Merge downloads its inputs one after the other and holds them in memory together (up to 500 MB in total).
- Size caps. Inputs above
maxFileMb(100 MB by default) and results above it are refused.
Run it after your scraper or downloader
If another Actor collects PDF links (a document scraper, a government-portal scraper, a downloader), this Actor can process them automatically after every run of it:
- In Apify Console, open that Actor and go to Integrations.
- Add Run Actor (on "Run succeeded") and pick this Actor.
- Use an input like this, with the name of the field that holds the PDF link or links:
{"operation": "info","datasetId": "{{resource.defaultDatasetId}}","urlField": "pdfUrl","onlyNew": true}
Each run of the first Actor then hands over its dataset, and every link in it is used. The field can hold one link or a list of links; a dotted path such as documents.file reaches into nested fields, and a list of objects with a url field works too. For merge, the dataset links are merged in dataset order (links in pdfUrls come first). If the dataset has no links, nothing runs and nothing is charged. Each output row keeps a small sourceItem (the field name, the link and the row's id if it has one) so you can match results to the original rows.
Run it on a schedule with only new files
Turn on onlyNew and schedule the run. The Actor keeps a list of what it has done in a key-value store named pdf-tools-seen in your account, keyed by a hash of the link, the operation and the settings that change the output (ranges, pages, degrees, level, output name). On the next run, files already done the same way come back as status: "skipped" rows and are not charged; change the operation or its settings and the files are processed again. For merge the key covers the whole ordered list of links, so a new link in the list means a new merge. Files that were not processed (for example because of maxItems or a charge limit), and files with an error, are not marked as done, so the next run picks them up. The list is saved at the end of the run. If the store cannot be opened, the run stops before charging anything.
Input
| Input | Default | What it does |
|---|---|---|
operation | split | merge, split, extract, rotate, compress or info |
pdfUrls | two IRS forms | direct links to PDF files |
datasetId, urlField | - , url | read links from another Actor's dataset; dotted paths and lists allowed |
ranges | 1-2 | split: one file per range, for example 1-3,5,7- |
everyN | none | split, when ranges is empty: one file per N pages |
pages | none | extract: pages to keep (required); rotate: pages to turn (empty = all) |
rotateDegrees | 90 | 90, 180 or 270 |
compressLevel | ebook | screen (smallest), ebook, printer (best quality), or none (only re-save the structure) |
outputName | none | name for the result files (merge: <name>.pdf, default merged.pdf) |
onlyNew | off | skip files already done with the same operation and settings |
maxItems | 200 | input PDFs per run (links and dataset together) |
maxFileMb | 100 | largest input and largest result in MB (hard cap 300) |
Notes:
- Split limit. One PDF makes at most 1,000 files in a split; beyond that the file gets an error row and you are asked to use
rangesor a largereveryN. - Compress. Image downsampling needs Ghostscript, which is installed in this Actor's image (Alpine's own package, AGPL-3.0, unmodified, run as a separate program; its source is at https://ghostscript.com/releases/). The levels are Ghostscript's own:
screenabout 72 dpi,ebookabout 150 dpi,printerabout 300 dpi. Downsampling lowers the quality of images by design; useprinterornoneif that matters. A text-only PDF that was already saved compactly often cannot get smaller; that is theunchangedresult. - What is kept. Pages are copied with their text, images and fonts. Document-level extras such as interactive form fields, bookmarks and tags may not carry over into split, extracted or merged files, so do not rely on them. For split, extract and merge, the original's title and author are not copied (the new files carry no title or author); rotate and compress keep them.
Output
One dataset row per result file (or per input that failed, was skipped or was unchanged). Each result file is stored in the run's key-value store, and outputUrl is its public link.
{"inputUrl": "https://www.irs.gov/pub/irs-pdf/fw9.pdf","operation": "split","status": "ok","error": null,"note": null,"outputUrl": "https://api.apify.com/v2/key-value-stores/57881fb7-fab8-47be-8668-faf3cbc3def1/records/fw9-f4fbd1d6-p1-2.pdf","outputKey": "fw9-f4fbd1d6-p1-2.pdf","pageRange": "1-2","inputPages": 6,"outputPages": 2,"inputBytes": 140815,"outputBytes": 40262,"savedPercent": null,"method": null}
This row is from our local run of the prefilled input; the store id in the link is the one that run used on our machine. On Apify it is your run's store. status is ok, error, skipped or unchanged (compress could not make the file smaller). For compress, savedPercent and method (object-streams or ghostscript-ebook and so on) are filled in. For a merge, the row has sourceUrls and inputCount, and inputUrl is null. For info, the row has title, author, subject, creator, producer, pdfVersion and encrypted. The result files stay as long as your Apify storage retention keeps the run.
Limits
- Direct PDF links only. A link that returns a web page is an error (free). Links to private or local network addresses are rejected.
- The PDF must be reachable without a login. Some sites block automated downloads; those links come back as errors with the server's answer.
- No password-protected PDFs, no OCR, no filling of forms, no repair of badly damaged files.
- Your PDFs are processed only inside this Actor's run on Apify; nothing is sent to other services.
- You are responsible for having the right to process the PDFs you give it.
日本語
PDF への直リンク(または他の Actor のデータセット)を、結合・分割・ページ抽出・回転・圧縮して、公開リンク付きのファイルで返します。ページ数・サイズ・タイトル・作成者・暗号化の有無を読む info も用意。ページ指定は 1-3,5,7- の形式。パスワード付き PDF は非対応(エラー行・無料)。圧縮は Ghostscript で画像を縮小し、小さくならなければ元のファイルのまま(無料)。保存できたファイル1つにつき $0.002、info は1件 $0.0003。失敗・スキップは無料です。onlyNew で前回までに処理済みのファイルをスキップできるので、スクレイパーの後や定期実行にも使えます。処理する PDF の権利はご自身でご確認ください。