# PDF Toolkit: Merge, Split, Compress, Images to PDF & Back (`plotpointtech/pdf-toolkit`) Actor

Merge, split, compress, rotate, watermark and number PDF pages, turn images into PDFs and PDF pages into PNG/JPG, edit metadata, remove known passwords. Chain steps in one run. $1 per 1,000 files + $0.30 per 1,000 pages.

- **URL**: https://apify.com/plotpointtech/pdf-toolkit.md
- **Developed by:** [Plot Point Technologies](https://apify.com/plotpointtech) (community)
- **Categories:** Developer tools, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.62 / 1,000 output files

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## PDF Toolkit: Merge, Split, Compress, Images to PDF & Back

**Merge, split, compress, rotate, watermark and convert PDFs in bulk for $1 per 1,000 output files plus $0.30 per 1,000 pages.** Give it links to your PDFs and images (or upload them), list the steps you want, such as **merge then compress**, and get a download link for every result with its page count, size before and after, and metadata. No desktop software, no file-size paywall, and it runs from the API, Make, Zapier or n8n.

### What can this PDF toolkit do?

- **Merge** many PDFs (and images) into one, in the order you give, with a bookmark for each file. Fillable form fields keep working.
- **Split** into single pages, every N pages, or custom ranges such as `1-2; 3-5; 6-end`.
- **Extract pages** you choose (`1-3,5,8-end`, `last`).
- **Compress** by downsampling the images inside (screen, eBook, printer or lossless) and cleaning up the file structure. Images are only replaced when the new copy is smaller.
- **Rotate** pages by 90, 180 or 270 degrees.
- **Text watermark** ("CONFIDENTIAL", "DRAFT", your company name) with opacity, size, angle and colour.
- **Page numbers** such as "Page 3 of 12", in any corner or centred, with your own start number.
- **Images to PDF**: JPEG, PNG, WebP, GIF, BMP, TIFF and iPhone HEIC photos into one PDF or one each, at original size or fitted to A4, Letter and more.
- **PDF to images**: every page (or the pages you pick) as PNG or JPG at the DPI you choose.
- **Metadata**: read title, author, subject, keywords, page count, encryption and form status, or set or clear them.
- **Remove a password** you know from your own protected PDF.
- **Chain steps** in any order, for example `imagesToPdf -> merge -> pageNumbers -> compress`, and optionally get **one ZIP** of all outputs.

### What data do you get?

One record per output file (one per page for PDF to images):

| Field | Description |
|---|---|
| `fileName`, `fileUrl`, `fileType` | Download link of the PDF or image |
| `operations` | Steps applied, in order |
| `sources`, `sourceCount` | Input files used for this output |
| `pagesBefore`, `pagesAfter` | Page counts before and after |
| `bytesBefore`, `bytesAfter`, `sizeChangePercent` | File size before and after |
| `page`, `widthPx`, `heightPx`, `dpi` | Page number and size of each image (PDF to images) |
| `metadata` | Title, author, subject, keywords, PDF version, encrypted, has form, has bookmarks |
| `compression` | Images found and recompressed by the compress step |
| `notes`, `status` | Anything worth knowing about the file |

### Who uses it?

- **Operations and back-office teams** merging invoices, contracts and scans into one file per customer.
- **Developers** adding merge, split, compress or "photo to PDF" to an app or workflow without running PDF libraries.
- **Legal and HR teams** stamping "CONFIDENTIAL" watermarks and page numbers on document bundles.
- **AI and data teams** turning PDF pages into images for vision models, or splitting long documents before processing.

### How to use it

1. Click **Try for free** (or **Start**).
2. Add **PDF and image URLs** (direct links to the files) or **upload a file**.
3. Pick the **Operations** in the order you want them applied.
4. Set the options for those steps (pages, split size, compression level, watermark text and so on).
5. Run it and open the **Output** tab to download the results.

### Input example

```json
{
  "files": [
    { "url": "https://example.com/invoices/inv-1001.pdf" },
    { "url": "https://example.com/invoices/inv-1002.pdf" },
    { "url": "https://example.com/scans/receipt.jpg" }
  ],
  "operations": ["imagesToPdf", "merge", "pageNumbers", "compress"],
  "outputFileName": "march-invoices.pdf",
  "compressionPreset": "ebook"
}
```

### Output example

From a real run with the default input (two public-domain IRS forms, merged and compressed):

```json
{
  "fileName": "merged.pdf",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/xy5Zwbl1Vs9ciT6D8/records/merged.pdf?signature=...",
  "fileType": "pdf",
  "operations": ["merge", "compress"],
  "sourceCount": 2,
  "pagesBefore": 11,
  "bytesBefore": 349660,
  "pagesAfter": 11,
  "bytesAfter": 131901,
  "sizeChangePercent": -62.3,
  "metadata": {
    "title": "Form W-9 (Rev. March 2024)",
    "pdfVersion": "1.3",
    "encrypted": false,
    "hasForm": true,
    "hasBookmarks": true
  },
  "status": "ok"
}
```

### How much does it cost?

**$0.001 per output file and $0.0003 per output page**, plus a $0.00005 start fee per run.

| You do | You pay |
|---|---|
| The default run (merge 2 forms, 11 pages, and compress) | $0.004 |
| Merge 3 PDFs of 10 pages each into one | $0.01 |
| Split a 200-page PDF into single pages | $0.26 |
| Compress 1,000 two-page invoices | $1.60 |
| Turn 500 photos into one PDF | $0.15 |
| A 50-page PDF to PNG images | $0.065 |

Files that cannot be downloaded or opened are listed in the run's OUTPUT record and not charged. Set a maximum cost per run in Apify Console and the tool stops when it is reached.

**Volume discounts on higher Apify plans.** The prices above are for the Apify Free plan. On paid plans they drop automatically: about 15% lower on Bronze, 25% lower on Silver and 38% lower on Gold and above.

### Use it via API, Make, Zapier, n8n or an AI agent

**Apify API.** Start a run and get the results back in one HTTP request (replace `YOUR_API_TOKEN` with the token from Apify Console > Settings > Integrations):

```bash
curl -X POST "https://api.apify.com/v2/acts/plotpointtech~pdf-toolkit/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"files": [{"url": "https://example.com/a.pdf"}, {"url": "https://example.com/b.pdf"}], "operations": ["merge", "compress"]}'
```

Official `apify-client` libraries exist for Python and JavaScript; the **API** tab on this page has ready-made code.

**No-code automation.** Connect the tool to **Make, Zapier, n8n, Google Drive, Dropbox, Slack** or any webhook with Apify integrations.

**AI agents (MCP).** Give Claude, ChatGPT, Cursor or any MCP-compatible agent direct access through the hosted Apify MCP server:

```
https://mcp.apify.com?tools=plotpointtech/pdf-toolkit
```

### FAQ

**Can it crack or remove a password I don't know?**
No. To open a protected PDF or remove its protection, you supply the password. The tool never guesses or cracks passwords. Only process files you own or have the right to change.

**How much smaller will compression make my PDF?**
It depends on the images inside. Scans and photo-heavy PDFs often shrink by 50-90% with the eBook or screen level; text-only PDFs are already small and change little. If a file cannot be made smaller, it is kept as it was and the record says so.

**Do fillable forms keep working after a merge or split?**
Yes. Form fields are copied with their pages, and duplicate field names are renamed so each form keeps its own values.

**Which files can it read?**
PDF (any version) and images: JPEG, PNG, WebP, GIF, BMP, TIFF and HEIC. Up to 100 MB per file and 2,000 pages per run by default; both limits can be raised.

**Where are the output files stored?**
In your Apify key-value store, kept for as long as your plan keeps run storage. The download links contain a signature, so anyone you share a link with can download that file.

### Related tools from Plot Point Technologies

- [PDF to Text & Tables Extractor - Markdown + OCR](https://apify.com/plotpointtech/pdf-text-markdown-tables-extractor): text, tables and OCR from PDFs.
- [Image OCR - Image to Text in Bulk](https://apify.com/plotpointtech/image-to-text-ocr-bulk): read text from images and page renders.
- [Bulk Image Converter & Compressor: WebP, AVIF, JPG, PNG, Resize](https://apify.com/plotpointtech/bulk-image-converter-compressor): resize and convert images before making PDFs.

Plot Point Technologies is not affiliated with Adobe or the IRS (source of the public-domain sample forms). Questions: support@plotpoint.tech.

***

If this tool saved you time, we would be grateful for a short review on this page; it helps other people find it. If something did not work as expected, please open an issue on the **Issues** tab and we will look into it quickly.

# Actor input Schema

## `files` (type: `array`):

Direct links to PDF files or images (JPEG, PNG, WebP, GIF, BMP, TIFF, HEIC). They are processed in this order (merge keeps it).

## `uploadedFile` (type: `string`):

Upload a PDF or image from your computer.

## `uploadedFile2` (type: `string`):

Optional second upload, for example to merge two files.

## `operations` (type: `array`):

Steps applied to the files in the order listed. Example: merge then compress.

## `pages` (type: `string`):

Pages for extract, rotate, watermark, page numbers and PDF to images: for example 1-3,5,8-end or last. Empty means all pages.

## `splitEveryNPages` (type: `integer`):

Split into parts of this many pages. 1 makes one PDF per page. Ignored if Split ranges is set.

## `splitRanges` (type: `string`):

One part per range, separated by semicolons, for example 1-2; 3-5; 6-end.

## `compressionPreset` (type: `string`):

How far images inside the PDF are downsampled. Lossless never changes image quality.

## `rotateDegrees` (type: `integer`):

90, 180 or 270 (negative turns the other way).

## `watermarkText` (type: `string`):

Text stamped across each selected page.

## `watermarkOpacity` (type: `number`):

0.02 (faint) to 1 (solid).

## `watermarkFontSize` (type: `number`):

0 sizes the text to fit the page.

## `watermarkAngle` (type: `number`):

Degrees, 45 runs bottom-left to top-right.

## `watermarkColor` (type: `string`):

Hex colour, for example #808080.

## `pageNumberFormat` (type: `string`):

Use {n} for the page number and {total} for the page count.

## `pageNumberPosition` (type: `string`):

Where the number is placed.

## `pageNumberFontSize` (type: `number`):

Font size in points.

## `pageNumberStart` (type: `integer`):

Number shown on the first selected page.

## `pageNumberMargin` (type: `number`):

Distance from the page edge in points (72 pt = 1 inch).

## `pageNumberColor` (type: `string`):

Hex colour.

## `imagesToPdfMode` (type: `string`):

Combine all images into one PDF or make one PDF each.

## `imagePageSize` (type: `string`):

Original keeps each image's own size; the others fit the image on that paper size.

## `imageMarginMm` (type: `number`):

White margin around each image when a paper size is used.

## `imageFormat` (type: `string`):

PNG is sharp for text; JPG is smaller for photos.

## `dpi` (type: `integer`):

150 is good on screen, 300 for print or OCR.

## `jpgQuality` (type: `integer`):

For JPG output.

## `metaTitle` (type: `string`):

New document title (metadata step). An empty value removes it.

## `metaAuthor` (type: `string`):

New document author (metadata step). An empty value removes it.

## `metaSubject` (type: `string`):

New document subject (metadata step). An empty value removes it.

## `metaKeywords` (type: `string`):

New document keywords (metadata step). An empty value removes it.

## `metaCreator` (type: `string`):

New document creator (metadata step). An empty value removes it.

## `metaProducer` (type: `string`):

New document producer (metadata step). An empty value removes it.

## `clearMetadata` (type: `boolean`):

Remove all document information and XMP metadata (metadata step).

## `password` (type: `string`):

The password of your protected PDF, needed to open it or to remove its protection. We never guess or crack passwords.

## `outputFileName` (type: `string`):

Name of the merged PDF.

## `addBookmarks` (type: `boolean`):

Add a bookmark at the start of each file in a merged PDF.

## `linearize` (type: `boolean`):

Linearise output PDFs so browsers show the first page while downloading.

## `createZip` (type: `boolean`):

One ZIP with all output files, handy for split and PDF to images.

## `maxFileSizeMb` (type: `integer`):

Larger files are skipped and not charged.

## `maxTotalPages` (type: `integer`):

Stop loading files once this many pages are reached.

## `maxConcurrency` (type: `integer`):

How many files to download at once.

## Actor input object example

```json
{
  "files": [
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    },
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw4.pdf"
    }
  ],
  "operations": [
    "merge",
    "compress"
  ],
  "compressionPreset": "ebook",
  "rotateDegrees": 90,
  "watermarkText": "CONFIDENTIAL",
  "watermarkOpacity": 0.2,
  "watermarkFontSize": 0,
  "watermarkAngle": 45,
  "watermarkColor": "#808080",
  "pageNumberFormat": "Page {n} of {total}",
  "pageNumberPosition": "bottom-center",
  "pageNumberFontSize": 10,
  "pageNumberStart": 1,
  "pageNumberMargin": 24,
  "pageNumberColor": "#000000",
  "imagesToPdfMode": "single",
  "imagePageSize": "original",
  "imageMarginMm": 0,
  "imageFormat": "png",
  "dpi": 150,
  "jpgQuality": 85,
  "clearMetadata": false,
  "outputFileName": "merged.pdf",
  "addBookmarks": true,
  "linearize": false,
  "createZip": false,
  "maxFileSizeMb": 100,
  "maxTotalPages": 2000,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `files` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "files": [
        {
            "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
        },
        {
            "url": "https://www.irs.gov/pub/irs-pdf/fw4.pdf"
        }
    ],
    "operations": [
        "merge",
        "compress"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("plotpointtech/pdf-toolkit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "files": [
        { "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf" },
        { "url": "https://www.irs.gov/pub/irs-pdf/fw4.pdf" },
    ],
    "operations": [
        "merge",
        "compress",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("plotpointtech/pdf-toolkit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "files": [
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
    },
    {
      "url": "https://www.irs.gov/pub/irs-pdf/fw4.pdf"
    }
  ],
  "operations": [
    "merge",
    "compress"
  ]
}' |
apify call plotpointtech/pdf-toolkit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plotpointtech/pdf-toolkit"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YqEvut8jcAJJYrSrS/builds/LVUKoKqkBPebUEexm/openapi.json
