# PDF to Image & Image Converter: PNG, JPG, WebP, HEIC, PDF (`ai_admin/pdf-image-converter`) Actor

$2 per 1,000 pages: PDF pages to PNG, JPG, WebP or TIFF (DPI, page ranges), images to PDF, and iPhone HEIC to JPG — both directions in one Actor. Resize, merge images into one PDF, download links and a ZIP of all files.

- **URL**: https://apify.com/ai_admin/pdf-image-converter.md
- **Developed by:** [Andriy Kuzmenko](https://apify.com/ai_admin) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 produced image or pages

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

## PDF to Image & Image Converter: PNG, JPG, WebP, HEIC, PDF

Render PDF pages to images, turn images into PDF and convert images between formats — including iPhone **HEIC** photos —
in bulk, with a download link for every file.

- **PDF → PNG, JPG, WebP or TIFF.** Choose the DPI (72 for thumbnails, 300 for print) and the pages (`1-3,5,8-`).
- **Images → PDF.** One PDF per image, or all images merged into a single PDF.
- **Image format conversion.** PNG, JPG, WebP, TIFF, GIF, BMP, HEIC/HEIF and AVIF in, PNG/JPG/WebP/TIFF out;
  multi-page TIFFs are split into frames; EXIF rotation is applied; optional downscaling.
- **ZIP of everything** and per-file download links in the dataset.

### Why this Actor

| | This Actor | Typical alternatives in the Apify Store (Oct 2026) |
|---|---|---|
| **Price** | **$2 per 1,000 images or pages** | $2–10 per 1,000, often plus a per-file fee |
| **Both directions** | PDF → images **and** images → PDF in one Actor, plus image format conversion | Often one direction per tool |
| **iPhone HEIC** | HEIC/HEIF → JPG/PNG/WebP/PDF | Rarely supported |
| **Control** | DPI 36–600, page ranges (`1-3,5,8-`), quality, max width, merge, ZIP | Often fixed settings |

### Input

```json
{
  "sources": [{ "url": "https://example.com/catalog.pdf" }, { "url": "https://example.com/IMG_0042.heic" }],
  "outputFormat": "jpg",
  "dpi": 150,
  "pages": "1-3",
  "quality": 85,
  "maxWidth": 1600,
  "zipAll": true
}
```

| Field | Meaning |
|---|---|
| `sources` | URLs of PDFs or images. Files in your own Apify key-value store work too: set the store's access to "Anyone with ID can read" and use `https://api.apify.com/v2/key-value-stores/<store ID>/records/<key>` (the Actor runs with limited permissions and does not use your token). |
| `outputFormat` | `png`, `jpg`, `webp`, `tiff`, or `pdf` (images only) |
| `dpi` | Resolution for PDF pages, 36–600 |
| `pages` | PDF pages to render, empty = all |
| `quality` | JPG/WebP quality 10–100 |
| `maxWidth` | Downscale wider images, 0 = keep size |
| `mergeImagesIntoOnePdf` | With `pdf` output: also return `merged.pdf` (free) |
| `zipAll` | Also return `all-files.zip` (free) |

### Output

```json
{
  "url": "https://example.com/catalog.pdf",
  "fileName": "catalog.pdf",
  "kind": "pdf",
  "outputFormat": "jpeg",
  "sourcePages": 12,
  "count": 3,
  "files": [
    { "key": "0001-catalog-p0001.jpg", "url": "https://api.apify.com/v2/key-value-stores/.../records/0001-catalog-p0001.jpg?signature=...", "bytes": 182311 }
  ],
  "warnings": []
}
```

A file that cannot be downloaded or opened gets an `error` field instead and is **not charged**.

### Pricing

| Event | Price | What counts |
|---|---|---|
| `page` | **$2 per 1,000** | one produced image (a rendered PDF page or a converted image frame), or one PDF made from an image |

Plus Apify's standard start fee of $0.05 per 1,000 runs. Merging and ZIP are free. The run stops before it would exceed
your maximum charge per run.

### Related Actors

- [Office to PDF & PDF/A](https://apify.com/ai_admin/office-to-pdf) — Word, Excel, PowerPoint, HTML → PDF/PDF-A
- [Document to Markdown for AI](https://apify.com/ai_admin/document-to-markdown) — PDFs, scans and Office files → Markdown, tables, RAG chunks

Open source: [github.com/AndriyVK/-apify-document-tools](https://github.com/AndriyVK/-apify-document-tools)

### Use with AI agents and code

- **MCP (Claude, Cursor, VS Code, any MCP client):** add `https://mcp.apify.com?tools=ai_admin/pdf-image-converter` as an MCP server —
  the agent gets one tool with this Actor's input schema and pays per use through your Apify account.
- **One HTTP call that returns the results:**

```bash
curl -X POST "https://api.apify.com/v2/acts/ai_admin~pdf-image-converter/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sources": [{"url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/text-3p-en.pdf"}], "outputFormat": "jpg", "dpi": 150, "pages": "1-2"}'
```

- **Agentic payments:** the Actor is enabled for Apify's agentic payments (x402), so autonomous agents can pay per run.

### Limits

- Password-protected PDFs are not supported. Maximum download size is 200 MB per file.
- Very large pages at high DPI produce large images; use `maxWidth` to keep them small.

# Actor input Schema

## `sources` (type: `array`):

Public URLs of PDFs or images (PNG, JPG, WebP, TIFF, GIF, BMP, HEIC/HEIF, AVIF). PDFs are rendered to images; images are converted to the output format. Files in your own Apify key-value store work too: set the store's access to "Anyone with ID can read" and use https://api.apify.com/v2/key-value-stores/<store ID>/records/<key>.

## `outputFormat` (type: `string`):

png, jpg, webp or tiff for PDF pages and images; pdf to turn images into PDF.

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

Rendering resolution: 72 = screen thumbnail, 150 = good default, 300 = print quality.

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

Pages to render, e.g. "1-3,5,8-". Empty = all pages.

## `quality` (type: `integer`):

10 (smallest) to 100 (best).

## `maxWidth` (type: `integer`):

Downscale wider images to this width, keeping the aspect ratio. 0 = keep size.

## `mergeImagesIntoOnePdf` (type: `boolean`):

With output format "pdf": also return merged.pdf with all input images in order (free).

## `zipAll` (type: `boolean`):

Also return all-files.zip with every produced file (free).

## Actor input object example

```json
{
  "sources": [
    {
      "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/text-3p-en.pdf"
    }
  ],
  "outputFormat": "png",
  "dpi": 150,
  "pages": "",
  "quality": 85,
  "maxWidth": 0,
  "mergeImagesIntoOnePdf": false,
  "zipAll": false
}
```

# Actor output Schema

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

Dataset items: url, kind, outputFormat, count, files (key, url, bytes) or error.

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

All images, PDFs, merged.pdf and all-files.zip in the run's key-value store.

# 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 = {
    "sources": [
        {
            "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/text-3p-en.pdf"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ai_admin/pdf-image-converter").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 = { "sources": [{ "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/text-3p-en.pdf" }] }

# Run the Actor and wait for it to finish
run = client.actor("ai_admin/pdf-image-converter").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 '{
  "sources": [
    {
      "url": "https://api.apify.com/v2/key-value-stores/FloomuI2DrQCJazY8/records/text-3p-en.pdf"
    }
  ]
}' |
apify call ai_admin/pdf-image-converter --silent --output-dataset

```

## MCP server setup

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

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/l9zg7OIxw7cNXE8Fx/builds/UcfxE9SOX8vGxWCgk/openapi.json
