
Render PDF Pages to Graphic File Formats with Accurate Color Preservation
Convert PDF Pages into Application-Ready Images
Many applications need to display, inspect, index, or distribute PDF content without embedding a full PDF viewer. Search results may need page thumbnails, publishing systems may require web images, and imaging workflows may accept raster formats rather than PDF. Rendering each page creates a stable visual representation that can be used by those systems while the original PDF remains unchanged.
The pdfRest PDF to Images API Tool renders selected PDF pages with Adobe PDF rendering and color technology. Separate endpoints produce JPG, PNG, TIFF, BMP, or GIF output, so the requested URL clearly identifies the resulting format. One API call can create an image for every selected page, and every output receives its own download URL and resource ID.
Choose the Right Image Format
The best format depends on how the image will be used:
- JPG provides adjustable compression for photographs, previews, and other continuous-tone page content where smaller files are important.
- PNG supports lossless output and RGBA, making it useful for sharp interface previews, diagrams, text-heavy pages, or workflows that require transparency.
- TIFF is widely used in document imaging, archival, OCR, and print-oriented systems.
- BMP supports straightforward bitmap interchange with Windows and legacy imaging applications, though its files may be larger than compressed alternatives.
- GIF can serve integrations that specifically require that established format.
Choosing the format deliberately avoids oversized assets or unnecessary quality loss. A content platform might generate JPG thumbnails for browsing while producing high-resolution TIFF pages for a separate OCR or preservation workflow.
Control Pages, Resolution, and Color
The pages parameter accepts individual pages, ranges, and combinations, allowing an application to render the full PDF or only the pages it needs. The parameter defaults to all pages. Restricting the request to a useful subset reduces processing and prevents unused images from being generated.
Resolution can be set from 12 to 2400 DPI. Higher resolution creates more pixels and generally larger files, so select it according to the downstream task. A small web preview needs far less resolution than print inspection, OCR, or detailed image analysis. Increasing the requested DPI cannot restore detail that does not exist in the source PDF.
Available color models include RGB, RGBA, CMYK, and grayscale where supported. Match the color model to the destination instead of assuming that screen and print workflows have the same requirements. pdfRest's Adobe-powered rendering and color management help interpret PDF page content and associated color information consistently through the conversion.
Use One Image for Every Selected Page
Each selected PDF page produces a separate image. Applications should parse the response as a collection, preserve the association between output files and source page numbers, and verify that the output count matches the request. Individual resource IDs can be sent to compatible follow-up tools; when several images need to be delivered as one package, the IDs can be passed to Zip Files.
The examples below demonstrate each supported image endpoint. The JPG sample uses color_model=cmyk for print-oriented color output.
JPG Code Example | Load this into API Lab↗
curl -X POST "https://api.pdfrest.com/jpg" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-F "file=@PATH_TO_FILE/pdfrest_pdf.pdf" \
-F "resolution=72" \
-F "color_model=cmyk" \
-F "jpeg_quality=80"
BMP Code Example | Load this into API Lab↗
curl -X POST "https://api.pdfrest.com/bmp" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-F "file=@PATH_TO_FILE/pdfrest.pdf" \
-F "pages=1-3" \
-F "resolution=300" \
-F "color_model=rgb"
PNG Code Example | Load this into API Lab↗
curl -X POST "https://api.pdfrest.com/png" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-F "file=@PATH_TO_FILE/pdfrest.pdf" \
-F "pages=2-last" \
-F "resolution=72" \
-F "color_model=rgba"
TIFF Code Example | Load this into API Lab↗
curl -X POST "https://api.pdfrest.com/tif" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-F "file=@PATH_TO_FILE/pdfrest.pdf" \
-F "pages=1,3,5" \
-F "resolution=300" \
-F "color_model=gray"
GIF Code Example | Load this into API Lab↗
curl -X POST "https://api.pdfrest.com/gif" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-F "file=@PATH_TO_FILE/pdfrest.pdf" \
-F "pages=10" \
-F "resolution=200"
Before production use, test pages containing photographs, fine text, vector artwork, transparency, spot colors, and unusual dimensions. Confirm the image format, pixel dimensions, color model, page count, and file-size tradeoffs against the consuming system's requirements.
Use API Lab to compare output settings and the PDF to Images API reference to review current parameters for each endpoint.
|
PDF to Images
|