---
title: "PDF-to-image API"
canonical_url: "https://www.nutrient.io/guides/dws-processor/tools-and-api/pdf-to-image-api/"
md_url: "https://www.nutrient.io/guides/dws-processor/tools-and-api/pdf-to-image-api.md"
last_updated: "2026-05-27T15:15:53.462Z"
description: "Save development time with an accurate and reliable PDF-to-image API. Use this plug-and-play integration to convert PDF to image in iOS, Android, web, and desktop apps."
---

# PDF-to-image API

The PDF-to-image API converts PDF pages into images (PNG, JPG, and WebP) with configurable dimensions and quality settings. The examples below use JPG, but you can change the `format` value to `png` or `webp`.

## Rendering a single page

By default, the first page is rendered. Render any other page by adding the `pages` option.

The example below renders the fifth page. Note that pages are indexed starting from zero:

```json

"output": {
  "type": "image",
  "pages": {"start": 4, "end": 4},
  "format": "jpg",
  "width": 500
}

```

## Rendering multiple pages

In addition to rendering a single page (the default), render multiple pages at the same time by adding the `pages` option.

> Render up to 50 pages in a single request. Requesting more than 50 pages results in a status `400` being returned.

The following example returns a ZIP file containing all pages:

```json

"output": {
  "type": "image",
  "pages": {"start": 0, "end": -1},
  "format": "jpg",
  "width": 500
}

```

Render a subset of pages by specifying a range. The example below renders pages two, three, and four:

```json

"output": {
  "type": "image",
  "pages": {"start": 1, "end": 3},
  "format": "jpg",
  "width": 500
}

```

Files in the ZIP archive are named `<page_number>.<format>` (e.g. `1.jpg`, `1.png`).

## Controlling image dimensions

Specify either a width, height, or resolution for output images — choose only one option. Specifying more than one results in a status `400` being returned.

Depending on which option you choose, one or both dimensions are determined based on the page dimensions in the document.

> The maximum image resolution is 34 million pixels (4960×7016px), regardless of aspect ratio. Requesting a larger image results in a status `400` being returned.

Specify the `width` option to render all pages with the same width and varying heights based on page dimensions:

```json

"output": {
  "type": "image",
  "format": "jpg",
  "width": 768
}

```

Specify the `height` option to render all pages with the same height and varying widths based on page dimensions:

```json

"output": {
  "type": "image",
  "format": "jpg",
  "height": 1024
}

```

Specify the `dpi` option to render pages where width and height depend only on page dimensions:

```json

"output": {
  "type": "image",
  "format": "jpg",
  "dpi": 72
}

```

---

## Related pages

- [Tools and APIs](/guides/dws-processor/tools-and-api.md)
- [Document-to-image API](/guides/dws-processor/tools-and-api/document-to-image-api.md)
- [DOCX templating API](/guides/dws-processor/tools-and-api/docx-templating-api.md)
- [Image-to-PDF API](/guides/dws-processor/tools-and-api/image-to-pdf-api.md)
- [Markdown-to-PDF API](/guides/dws-processor/tools-and-api/markdown-to-pdf-api.md)
- [Office-to-PDF API](/guides/dws-processor/tools-and-api/office-to-pdf-api.md)
- [PDF security API](/guides/dws-processor/tools-and-api/pdf-security-api.md)
- [PDF-to-PDF/A API](/guides/dws-processor/tools-and-api/pdf-to-pdfa-api.md)
- [PDF generator API](/guides/dws-processor/tools-and-api/pdf-generator-api.md)
- [PDF watermark API](/guides/dws-processor/tools-and-api/pdf-watermark-api.md)
- [PDF OCR API](/guides/dws-processor/tools-and-api/pdf-ocr-api.md)
- [PDF/UA auto-tagging API](/guides/dws-processor/tools-and-api/pdfua-api.md)
- [Redaction API](/guides/dws-processor/tools-and-api/redaction-api.md)

