Convert PDF pages to high-quality raster images. Supports page selection, multiple output formats, DPI control, and color modes. Includes info and preview sub-routes for inspecting PDFs before conversion.
- Uses MuPDF for PDF rendering, providing high-fidelity output with correct font rendering and vector graphics.
- Password-protected PDFs are not supported and will return a 400 error.
- The `pages` parameter supports flexible syntax:
-`"all"` or `""` - all pages
-`"3"` - single page
-`"1-5"` - page range (inclusive)
-`"1,3,5-8"` - mixed individual pages and ranges
- Page numbers are 1-based. Specifying pages beyond the document length returns a 400 error.
- The main endpoint always generates both individual page downloads and a ZIP containing all selected pages.
- The preview endpoint renders at 72 DPI and scales to 300px width for fast thumbnail generation. Thumbnails are JPEG at 60% quality.
- The preview endpoint respects the `MAX_PDF_PAGES` server configuration, limiting how many thumbnails are generated.
- For large documents at high DPI, processing time increases proportionally. Consider using lower DPI (150) for web use and higher DPI (300-600) for print.