Turn PDF pages into pictures
pdf_to_imageDraws pages of a PDF as PNG or JPEG pictures and returns the render with download_url: one page gives the picture, which this tool also hands back so you can look at it (up to 2 MB), several pages a ZIP of pictures named by page. At most 100 pages and 120 million pixels a call, about 13 A4 pages at 300 dpi. Use it to see a page before redact_pdf, or for thumbnails. Pass exactly one PDF: source, a render or library file of the workspace, or file_base64, the PDF itself. Starter plan and above; one unit per picture on a live key.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pdf_to_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | Resolution, 36 to 300, 150 when left out; at 72 a pixel stands for a point | |
| pages | No | The pages to draw, such as 1, 1-3,5 or 2- (page 2 to the last); every page when left out | |
| format | No | png (the default) or jpg | |
| source | No | A PDF of the workspace: the rnd_ id of a PDF render, or a PDF of the file library by name (such as terms.pdf) or fil_ id | |
| quality | No | JPEG quality, 1 to 100; ignored for PNG | |
| filename | No | Name of the file behind download_url; the source's name when left out | |
| file_name | No | Name of the PDF given as file_base64 or path, e.g. contract.pdf; the results are named after it | |
| file_base64 | No | The PDF itself, base64 encoded, up to 20 MB; sent with the request and not kept |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | rnd_ id of the render | |
| form | No | What fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran | |
| pdfa | No | The PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it | |
| error | Yes | Why a failed render failed | |
| units | Yes | Units the render counted | |
| output | No | The format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image | |
| status | Yes | ||
| einvoice | No | The e-invoice report, when the render made one | |
| template | Yes | The template and version rendered; null for html and conversions | |
| expires_at | Yes | When download_url stops working; get_render issues a fresh one | |
| page_count | Yes | ||
| environment | Yes | ||
| download_url | Yes | Signed link to the file; null until the render succeeded | |
| accessibility | No | The PDF/UA-1 verdict, when the template declares it |