# Images to PDF & PDF to Images Converter \[$1.50/1K 💰] (`cybermax/image-to-pdf`) Actor

💰 $1.50 per 1,000 pages; failed files and pages free, no start fee. Convert images to PDF in bulk (JPG, PNG, WebP, AVIF, GIF, HEIC, SVG into one PDF, A4, Letter or fit) and PDF to images (every page as PNG, JPG or WebP at your DPI, plus a ZIP). Links or any dataset in.

- **URL**: https://apify.com/cybermax/image-to-pdf.md
- **Developed by:** [CyberMax](https://apify.com/cybermax) (community)
- **Categories:** Automation, Developer tools, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 page converteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Pagepail: Image to PDF & PDF to Image Converter, in Bulk

#### Image links in, one PDF out. PDF links in, every page as an image.

Image to PDF converter for whole lists: give it image links (JPG, PNG, WebP, AVIF, GIF, HEIC, TIFF, SVG) and get one clean PDF in A4, Letter or fit-to-image pages; give it PDF links and get every page as a PNG, JPG or WebP at the DPI you choose, plus a ZIP. **$1.50 per 1,000 pages**; failed files and pages free, no start fee.

**[▶ Try it now with a prefilled input](https://console.apify.com/actors/DJ9Vaa4pbAbZxeq9E/input)** · $0.0015 per page (1,000 pages = $1.50) · Apify's free plan includes $5 of credit a month, enough for about 3,000 pages

**Built for:** Shops turning product photos into a PDF catalogue or line sheet · Teams turning scanned receipts or photos of documents into one PDF · Developers who need PDF pages as images for OCR, thumbnails or AI vision models · Anyone with a Picpail ZIP who wants it as a PDF

**Real output** (real runs on Apify, 11 Nov 2026):

| Input | Result | Pages | Size | Time |
|---|---|---|---|---|
| 3 images (JPG, WebP, PNG), A4, 10 mm margin | images.pdf | 3 | 305 KB | 3.2 s |
| IRS Form W-9 PDF, pages 1-2, 150 DPI, PNG | 001-fw9-p001.png, 001-fw9-p002.png + ZIP | 2 of 6 | 1272 × 1647 px each | 3.3 s |

**Plug it in (copy-paste):**

- **Make:** Apify → *Run an Actor* · Actor `cybermax/image-to-pdf` · Run synchronously: Yes · Input `{"urls": {{map(1.images; "url")}}, "pageSize": "a4"}` → Apify → *Get Record* `OUTPUT` → the PDF link is in `pdfs[0].url`.
- **Zapier:** Apify → *Run Actor* · Actor `cybermax/image-to-pdf` · Input `{"urls": ["{{PDF URL}}"], "format": "jpeg", "dpi": 150}` · Wait for run to finish: Yes → *Find Dataset Items* → one `fileUrl` per page.
- **n8n:** HTTP Request · POST `https://api.apify.com/v2/acts/cybermax~image-to-pdf/run-sync-get-dataset-items` · Header `Authorization: Bearer YOUR_APIFY_TOKEN` · JSON body `{"urls": ["https://www.irs.gov/pub/irs-pdf/fw9.pdf"], "pages": "1-2"}`.
- **MCP (Claude, Cursor, any agent):** server `https://mcp.apify.com/?tools=cybermax/image-to-pdf` with header `Authorization: Bearer YOUR_APIFY_TOKEN`, then ask "turn these 20 product photos into one A4 PDF".

### How it works

- **Images to PDF:** each image is downloaded, checked from its bytes, turned upright from its EXIF rotation, scaled down if it is larger than `maxImageSide`, and placed on its own page in your order. JPEGs stay JPEG, transparent images stay PNG, everything else (WebP, AVIF, HEIC, GIF, TIFF, SVG) becomes a high-quality JPEG. `pageSize: "fit"` makes each page the size of its image; paper sizes centre each image, with landscape pages for wide ones.
- **PDF to images:** each page is rendered with PDFium (the engine inside Chrome) at your DPI, up to 40 megapixels a page, as PNG, JPG or WebP, saved with its own link and, per PDF, in one ZIP.
- **Auto mode** handles a mixed list: images become one PDF, PDFs become images. Links that are neither (an HTML page, a 404) are listed as free `error` rows.

### Output

- **Dataset:** one row per page: `type` (`pdf-page` or `image`), `sourceUrl`, `page`, `width`, `height`, and `pdfUrl` or `fileUrl`, `dpi`, `bytes`; failures as free `error` rows with the reason.
- **Key-value store:** `images.pdf` (or one PDF per image), the page images and `<name>-pages.zip`, and `OUTPUT` with every PDF and ZIP link.

### Input

| Field | Default | What it does |
|---|---|---|
| `urls` | – | Image and/or PDF links, mixed. |
| `datasetId`, `urlField` | –, auto | Convert the links in another run's dataset, e.g. [Picpail](https://apify.com/cybermax/bulk-image-downloader)'s `imageUrl`. |
| `mode` | `auto` | `imagesToPdf` or `pdfToImages` to force one direction. |
| `onePdf`, `pdfName` | true, `images` | One combined PDF, or one per image. |
| `pageSize`, `marginMm` | `fit`, 0 | `fit`, `a4`, `letter`, `legal`, `a3`, `a5`; white margin in mm. |
| `maxImageSide`, `jpegQuality` | 4000, 90 | Keeps PDFs a sensible size. |
| `format`, `dpi`, `pages` | `png`, 150, all | Page images: format, resolution, and pages like `1-3, 5, 10-` or `last`. |
| `maxPagesPerPdf`, `zip`, `maxFileMb` | 300, true, 100 | Safety caps and the ZIP per PDF. |

### Pricing

**$0.0015 per page ($1.50 per 1,000)**: one image placed in a PDF, or one PDF page rendered. No start fee; files that fail to download or open and pages that fail to render are free. Store rivals for the same job (Apify Store API, 11 Nov 2026): $0.001 per page (brasspage/pdf-to-image), $0.002 per page or image (ai_admin/pdf-image-converter).

### FAQ

**Can it read text from the pages?** Pagepail makes the images; [Inkscry](https://apify.com/cybermax/image-to-text-ocr) reads the text in them, and [Pageshuck](https://apify.com/cybermax/pdf-to-text) pulls text straight from PDFs.

**Password-protected PDFs?** They are reported as a free error row; remove the password first.

**Can an AI agent use it (MCP)?** Yes. Add `https://mcp.apify.com/?tools=cybermax/image-to-pdf` as an MCP server in Claude, Cursor, VS Code or any MCP client.

**Can I call it from Python, JavaScript or plain HTTP?** Yes. POST your input JSON to `https://api.apify.com/v2/acts/cybermax~image-to-pdf/run-sync-get-dataset-items` with your Apify token, or use the `apify-client` package.

**Is it legal to convert images I found online?** Converting is fine; reusing other people's images or documents needs their permission. This is general information, not legal advice.

### Start now

**[▶ Try Pagepail with a prefilled input](https://console.apify.com/actors/DJ9Vaa4pbAbZxeq9E/input)** · $1.50 per 1,000 pages. Questions or a missing format? Open an issue on the [Store page](https://apify.com/cybermax/image-to-pdf) and it gets answered the same day.

### Also from CyberMax

- [Picpail — bulk image downloader](https://apify.com/cybermax/bulk-image-downloader): every image from pages or a whole site, full size, in one ZIP; pass its dataset straight to Pagepail.
- [Pixkiln — image converter & compressor](https://apify.com/cybermax/image-converter): resize and convert images to WebP or AVIF in bulk.
- [Inkscry — image to text OCR](https://apify.com/cybermax/image-to-text-ocr): read the text in every page image.
- [Ferrywren — bulk file downloader](https://apify.com/cybermax/bulk-file-downloader): download PDFs and other files from links or pages into one ZIP.
- [Namewhere — company name to domain](https://apify.com/cybermax/company-to-domain): official website domains for a list of company names.

### Changelog

- 11 Nov 2026: first release: images to PDF (fit, A4, Letter, Legal, A3, A5, margins, EXIF rotation) and PDF to images (PNG, JPG, WebP, 36-300 DPI, page ranges, ZIP per PDF), auto mode, dataset input.

© 2026 CyberMax. All rights reserved.

Found Pagepail useful? A quick rating helps others find it.

# Actor input Schema

## `urls` (type: `array`):

Image links (JPG, PNG, WebP, AVIF, GIF, HEIC, TIFF, SVG) become pages of one PDF, in this order. PDF links come back as one image per page. Mix both freely.

## `datasetId` (type: `string`):

A dataset from another run, e.g. Picpail's image list or a product scraper: its image or PDF links are converted (imageUrl, fileUrl, url… detected).

## `urlField` (type: `string`):

Optional: the field that holds the link. Leave empty to detect it.

## `mode` (type: `string`):

Auto reads each file's real type from its bytes.

## `onePdf` (type: `boolean`):

Off: one PDF per image.

## `pdfName` (type: `string`):

Name of the combined PDF (images.pdf by default).

## `pageSize` (type: `string`):

Fit = each page the size of its image. Paper sizes center each image; wide images get landscape pages.

## `marginMm` (type: `integer`):

White border around each image.

## `maxImageSide` (type: `integer`):

Bigger images are scaled down to keep the PDF a sensible size.

## `jpegQuality` (type: `integer`):

For images re-encoded into the PDF and for JPG/WebP page images.

## `format` (type: `string`):

Format of each page image.

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

150 for screens and OCR, 300 for print. A4 at 150 DPI = 1240 x 1754 px.

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

Optional, e.g. "1-3, 5, 10-" or "last". Empty = every page.

## `maxPagesPerPdf` (type: `integer`):

Safety cap per PDF.

## `zip` (type: `boolean`):

All page images of each PDF in one ZIP.

## `maxFileMb` (type: `integer`):

Bigger files are skipped (free).

## Actor input object example

```json
{
  "urls": [
    "https://www.gstatic.com/webp/gallery/1.jpg",
    "https://www.gstatic.com/webp/gallery/2.webp",
    "https://www.gstatic.com/webp/gallery3/1.png"
  ],
  "mode": "auto",
  "onePdf": true,
  "pdfName": "images",
  "pageSize": "fit",
  "marginMm": 0,
  "maxImageSide": 4000,
  "jpegQuality": 90,
  "format": "png",
  "dpi": 150,
  "maxPagesPerPdf": 300,
  "zip": true,
  "maxFileMb": 100
}
```

# Actor output Schema

## `pdf` (type: `string`):

No description

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

No description

## `summary` (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 = {
    "urls": [
        "https://www.gstatic.com/webp/gallery/1.jpg",
        "https://www.gstatic.com/webp/gallery/2.webp",
        "https://www.gstatic.com/webp/gallery3/1.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cybermax/image-to-pdf").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 = { "urls": [
        "https://www.gstatic.com/webp/gallery/1.jpg",
        "https://www.gstatic.com/webp/gallery/2.webp",
        "https://www.gstatic.com/webp/gallery3/1.png",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("cybermax/image-to-pdf").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 '{
  "urls": [
    "https://www.gstatic.com/webp/gallery/1.jpg",
    "https://www.gstatic.com/webp/gallery/2.webp",
    "https://www.gstatic.com/webp/gallery3/1.png"
  ]
}' |
apify call cybermax/image-to-pdf --silent --output-dataset

```

## MCP server setup

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

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/DJ9Vaa4pbAbZxeq9E/builds/lNmYYEPn9bGdXf6oH/openapi.json
