---
title: 'pdf › pageRanges'
description: 'Define specific page ranges for your website-to-PDF conversion. Extract single pages or custom intervals like "1-5, 8, 11-13" from any URL using the Microlink API pageRanges parameter.'
---

import { MultiCodeEditorInteractive } from 'components/markdown/MultiCodeEditorInteractive'
import { Iframe } from 'components/markdown/Iframe'
import { Type } from 'components/markdown/Type'

Type: <Type children='<string>'/><br/>

It specifies the page range for generating the [pdf](/docs/api/parameters/pdf) over the target [url](/docs/api/parameters/url).

<Iframe src="https://cdn.microlink.io/docs/stripe.pdf" />

<MultiCodeEditorInteractive mqlCode={{ url: 'https://stripe.com', pdf: { pageRanges: '1' } }} />

Any interval can be defined, such as, `'1-5, 8, 11-13'`. A single page is just its number, e.g., `'9'`. Leaving the end open prints to the last page, e.g., `'5-'`.

When the range falls outside the document, the request fails with [EPAGERANGE](/docs/api/basics/error-codes#epagerange).

