# PDF to Images & Images to PDF Converter - PNG, JPG, Bulk (`wood-between-studio/pdf-image-converter`) Actor

Turn PDF pages into PNG or JPG images at any DPI, or combine JPG, PNG, WebP and GIF images into one PDF. Bulk from URLs, with download links. $1 per 1,000 pages rendered, $0.003 per PDF created.

- **URL**: https://apify.com/wood-between-studio/pdf-image-converter.md
- **Developed by:** [Wood Between Studio](https://apify.com/wood-between-studio) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 pdf page rendereds

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 Images & Images to PDF Converter: PNG, JPG, Bulk from URLs

Two tools in one:

1. **PDF to images.** Every page of every PDF becomes a PNG or JPG at the resolution you choose (72-400 DPI). Pick page ranges like `1-3` or `1,4,7`.
2. **Images to PDF.** Combine JPG, PNG, WebP, GIF, TIFF or AVIF images into **one PDF**, in the order given, with each page sized to its image or centered on A4 / Letter.

Every output file gets a **direct download link** in the dataset.

### Why use it?

- **Fast, reliable rendering** with Poppler (the engine behind most Linux PDF viewers), not a headless browser.
- **Bulk.** Many PDFs per run, up to 2,000 pages each.
- **Cheap.** **$0.001 per page rendered** ($1 per 1,000) and **$0.003 per PDF created**. No start fee. Failed files are free. Many alternatives charge $0.005 per page.

### Use cases

- Thumbnails and previews of PDFs for websites, catalogs and document libraries
- Feeding PDF pages to OCR or vision AI models as images
- Turning scans, receipts, photos or screenshots into one PDF
- Social media images from PDF slides or flyers

### Input

| Field | Default | Notes |
|---|---|---|
| `mode` | `pdfToImages` | or `imagesToPdf` |
| `fileUrls` | (required) | Direct links to PDFs or images |
| `imageFormat` | `png` | `png` or `jpg` (PDF to images) |
| `dpi` | `150` | 72 screen, 150 default, 300 print |
| `pages` | all | e.g. `1-3`, `2,5,9`, `4-` |
| `maxPagesPerPdf` | `200` | Safety limit |
| `pageSize` | `fit` | `fit`, `A4` or `Letter` (images to PDF) |
| `outputName` | `combined.pdf` | (images to PDF) |

```json
{ "mode": "pdfToImages", "fileUrls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"], "imageFormat": "png", "dpi": 150 }
```

### Output

PDF to images, one row per page:

```json
{ "source": "https://.../dummy.pdf", "status": "success", "page": 1, "pages": 1, "fileKey": "1-dummy-p0001.png", "fileUrl": "https://api.apify.com/v2/key-value-stores/.../records/1-dummy-p0001.png?signature=...", "width": 1275, "height": 1650, "bytes": 23716 }
```

Images to PDF: one row per image plus a final row with the combined PDF's `fileUrl`.

### Pricing

Pay per event: `page-rendered` **$0.001**, `pdf-created` **$0.003**. Files that fail to download or read are not charged.

### Notes

Files up to 200 MB. Password-protected PDFs are reported as failed. Only convert files you have the right to use. Built by Wood Between Studio. Questions? Use the Issues tab.

# Actor input Schema

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

PDF to images: every PDF URL becomes one image per page. Images to PDF: all image URLs are combined into one PDF, in order.

## `fileUrls` (type: `array`):

Direct links to PDF files (PDF to images) or image files (images to PDF).

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

Output image format for PDF to images.

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

72 = screen, 150 = good default, 300 = print.

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

Page range, e.g. 1-3 or 1,4,7. Empty = all pages.

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

Safety limit per document.

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

fit = each page is the size of its image; A4/Letter = image centered on the page.

## `outputName` (type: `string`):

File name for images to PDF.

## Actor input object example

```json
{
  "mode": "pdfToImages",
  "fileUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "imageFormat": "png",
  "dpi": 150,
  "maxPagesPerPdf": 200,
  "pageSize": "fit",
  "outputName": "combined.pdf"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "fileUrls": [
        "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wood-between-studio/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 = { "fileUrls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("wood-between-studio/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 '{
  "fileUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ]
}' |
apify call wood-between-studio/pdf-image-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wood-between-studio/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/XjUUB1eONeOrahTrH/builds/bInSkSRaFlwvHPz8Z/openapi.json
