Loading
Loading
Convert PDF pages into high-quality images in PNG, JPG, TIFF, BMP, or GIF format.
The PDF to Image API converts PDF pages into image files in five supported formats. You can specify individual pages, ranges, or convert the entire document. Customize output with options like DPI, color mode, and image quality. Select a format above to see its specific endpoint and parameters.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
All PDF to image endpoints accept the same common parameters with additional format-specific controls for color profiles and quality.
Best For: Photographs, small file sizes, general viewing
The PDF to Image API accepts a file upload, query parameters, and request headers described below.
The request body is a single optional file upload sent as multipart/form-data. All other parameters (including file_id, resolution, and profile) are passed as query parameters, not in the request body.
{
"file": "/path/to/document.pdf"
}fileoptionalmultipart/form-dataThe PDF file to process.
All parameters must be included as query parameters. Any parameters sent in the form data will be ignored.
formatoptionalStringdefault: jsonResponse format: 'json' (default) or 'xml'.
file_idoptionalStringThe unique ID of a PDF file already present on our server. Use this instead of uploading the file again.
outputoptionalStringName of the output zip file (without extension) containing all generated images. Format can either be png, jpg, tif, bmp or gif.
destroyoptionalBooleandefault: falseIf true, we delete the input file immediately after generating the output images.
pagesoptionalStringdefault: allSpecify the pages to be converted to image format from the PDF. Provide individual page numbers and/or ascending page ranges (e.g., 1, 3-5, 7). Use commas to separate entries and hyphens for ranges. Any duplicate pages will be removed, while preserving the original page order. You may instead provide only one of the special keywords: even - converts all even-numbered pages, odd - converts all odd-numbered pages, last - converts only the last page, all - converts all pages. Examples: "1,4-2,last" / "odd" / "all" / "1,odd" (invalid). Note: Mixing special keywords with specific pages/ranges is not allowed.
resolutionoptionalIntegerdefault: 150Output image resolution in DPI. Acceptable range: 20 to 1200. Higher values produce sharper images but larger file sizes. Default value for pdf to gif is 100.
image_smoothingoptionalStringdefault: noneAnti-aliasing options to apply during conversion. Use none to disable all smoothing, all to enable everything, or a comma-separated combination of text, line, and image (e.g., "text,line"). If not provided, no smoothing will be applied.
webhook_urloptionalStringThe URL where we'll send the webhook notification after the task completes. Authentication parameters in the URL (e.g., ?auth=token123) are passed as-is.
webhook_failure_notificationoptionalBooleandefault: falseIf true, we'll send an email notification if the webhook request fails after 3 retries. The email goes to the requesting user or their org admin if user is part of an organization.
profileoptionalStringdefault: rgbColor profile for the output JPG images. gray - 8-bit grayscale; rgb - 24-bit RGB color (default); cmyk - 32-bit CMYK color, commonly used for print workflows.
qualityoptionalIntegerdefault: 70JPG compression quality. Range: 1 to 100. Higher values yield sharper images with larger file sizes; lower values produce smaller files with more compression artifacts.
Optional custom headers for webhook authorization
X-Webhook-AuthorizationoptionalStringCustom authorization header sent with the webhook request. Format: Key:Value (e.g., Authorization:Bearer token123).
A successful request returns a 200 OK response with a JSON object containing the task ID and input file IDs.
taskIdUnique identifier for the PDF task, used to check status.
inputIdsArray of file IDs referencing input files used for the task. Not returned when destroy=true.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
Please provide a valid PDF file. Other file types are not supported.
Please provide either a file or a file ID.
Please provide a valid image profile. Refer to the documentation for valid profiles.
Please provide a valid smoothing option or combination. Refer to the documentation for valid options.
Please provide a valid image resolution (DPI). Refer to the documentation for valid resolution values.
Please provide a valid image quality value from 1 to 100. (JPG only)
Please provide a valid file ID.
These errors might appear in the task-status response if the background job fails.
The provided file is not a valid PDF file.
An unknown error occurred while saving the file. Try again later.
An unknown error occurred while generating the PDF. Try again later.
Internal Server Error Occurred.
Please provide a valid file ID.
The provided PDF file is encrypted. Please decrypt it first to perform operations.
Please provide a valid image profile. Refer to the documentation for valid profiles.
One or more specified page numbers exceed the total number of pages in the PDF document.
The provided page number format is invalid. Refer to the documentation for valid page number formats.