Convert PDF to Image
pdf-imageConvert PDF pages to PNG images for visual verification without external applications. Choose specific pages or all pages with adjustable scale for thumbnail, preview, or detailed views.
Instructions
Generate PNG image(s) from PDF pages.
Use this to visually verify PDF output without opening external applications.
Pages Options:
Single page:
pages: 1orpages: 3Multiple pages:
pages: [1, 3, 5]All pages:
pages: "all"Default: page 1 only
Viewport Scale Recommendations:
0.25 (thumbnail): ~150px wide, smallest file (~15-30KB). Use for quick verification.
0.5 (preview): ~300px wide, good balance (~40-80KB). Recommended default.
1.0 (full): ~612px wide, detailed view (~150-300KB). Use when details matter.
Lower scales produce smaller files, reducing context usage when sharing images.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdfPath | Yes | Absolute path to the PDF file | |
| pages | No | Pages to render: single number (e.g., 1), array (e.g., [1, 3, 5]), or "all". Default: 1 | |
| viewportScale | No | Scale factor for the image. Recommended: 0.25 (thumbnail, ~150px wide, smallest), 0.5 (preview, ~300px wide, good balance), 1.0 (full size, ~612px wide). Default: 0.5 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| images | Yes | Array of generated images | |
| totalPages | Yes | Total pages rendered |