PDF to Image APIs - Convert PDF to JPG, PNG, TIFF, BMP & GIF
Transform PDF documents into high-quality images with our comprehensive PDF to Image conversion APIs. Convert PDFs to JPG, PNG, TIFF, BMP, and GIF formats with precise control over resolution, color profiles, and page selection. Whether you need to generate thumbnails for document previews, create high-resolution images for print workflows, or extract specific PDF pages as images for web display, our APIs handle it all with exceptional speed and reliability.
Set resolution from 20 to 1200 DPI, choose from multiple color profiles including grayscale, RGB, RGBA, CMYK, and specialized formats like 1-bit black & white, convert specific page ranges, and handle files up to 1GB in size. Select exactly which pages to convert using flexible syntax, apply image smoothing for enhanced quality, and control color profiles for optimal file sizes.
Perfect for document management systems generating preview images, publishing platforms creating thumbnails, archival services digitizing records, e-learning applications displaying course materials, and SaaS applications requiring on-demand PDF page rendering. With asynchronous request processing and webhook support, you can seamlessly integrate PDF to image conversion into your automation workflows.
Features
Multiple Image Format Support
Convert PDFs to five popular image formats: PNG, JPG, TIFF, BMP, and GIF. Each format is optimized for different workflows, from web thumbnails and transparent graphics to professional print preparation and legacy system compatibility.
Flexible Resolution Control
Configure output resolution from 20 to 1200 DPI to meet any quality requirement. Whether you're optimizing for web performance, archival storage, or high-resolution print production, precise DPI control ensures your images match your exact specifications.
Advanced Compression Control
Balance image quality against file size with granular compression settings. JPG quality levels from 1-100, indexed color palettes for reduced file sizes, and format-specific optimizations give you complete control over output characteristics without sacrificing visual fidelity.
Versatile Color Profiles
Support for multiple color spaces including monochrome, grayscale, RGB, RGBA with transparency, and CMYK for print. Select the optimal color profile based on your output medium and file size requirements.
Professional Print Support
Convert PDFs with specialized color spaces for professional workflows. Support for CMYK print-ready output and indexed color palettes (4-bit, 8-bit) for optimized file sizes without compromising visual quality.
Granular Page Selection
Extract specific pages, ranges, or entire documents with flexible selection syntax. Support for individual pages, continuous ranges, combined selections, and special keywords like "odd", "even", "last", and "all" for precise control over conversion output.
Anti-Aliasing Support
Enhance output quality with configurable anti-aliasing controls. Apply smoothing globally or selectively to text, lines, and images to eliminate jagged edges and improve visual clarity while maintaining processing speed and file efficiency.
Asynchronous Processing
Upon successful request, our API immediately returns a 200 OK response with a unique Task ID, processing your file in the background. You can track the task progress via our Task Status API using the unique Task ID.Webhook Notifications
If you don't want to poll for task status, you can simply provide the webhook data in your request. Instead of manually checking status, we will automatically notify your endpoint the moment the task processing is completed.
Zero Data Retention
Your privacy matters. When you set thedestroy parameter, your files are permanently wiped from our servers immediately after processing finishes, ensuring complete data security. If destroy is not set, files are retained up to 30 days based on user's plan.Large File Support
Handle heavy documents and high-resolution assets with ease. Our API supports a massive 1GB payload size per request, allowing you to process even the largest PDF files without worrying about size restrictions.
Note: The output zip file and task status is only retained up to a 1 day at max for PDF to Image APIs
Need to quickly Convert your PDFs to Image files in browser?
Free Online PDF to Image Converter turns your PDF pages into high quality images right in your browser. Convert to JPG, PNG, TIFF, BMP, or GIF - pick the format that fits your needs. No downloads, no installation, no sign-up required. Just upload your PDF, choose your settings, and get your images in seconds.
API Endpoints
Select an image format to view its specific endpoint, parameters, and examples:
API Endpoint
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/pdf/jpg?resolution=150&quality=85&profile=rgb&output=web_images"
payload = {}
files=[
('file',('file.pdf',open('/path/to/file.pdf','rb'),'application/pdf'))
]
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Utility & Resource APIs
Use these endpoints to manage files and check task status.
Task Status API
task_id. The response includes creation and expiry timestamps to help you track result availability, along with specific error details if a task fails. Results are retained for up to 7 days, depending on the operation.File Status API
file_id. Returns details including file name, size, type, and creation/deletion timestamps. Generated or uploaded files are retained up to 30 days based on user's plan, unless destroy is enabled to delete them immediately. You can use this endpoint to check if the file has expired using its file_id.File Download API
PDF Delete API
Files List API
File Upload API
multipart/form-data request. Each file receives a unique file_id that can be used with the PDF APIs.Upload Binary API
file_id for uses with the PDF APIs.How to Guides
Optimizing Your Image Conversion
Use this quick reference to tune the API parameters for your specific needs.
Resolution (
resolution):- 72 - 150 DPI: Best for standard screens and web thumbnails (fastest processing).
- 300 DPI: Standard for high-res displays, OCR processing, and general printing.
- 600+ DPI: Required for professional offset printing or architectural blueprints.
Color Profiles (
profile):- rgb: The standard for all digital screens (Web, Mobile, Email).
- rgba: Adds an alpha channel for transparency (Available for PNG and GIF only).
- cmyk: Essential for commercial printing workflows (Available for TIFF and JPG).
- bw / gray: Use bw (1-bit) for fax/archiving to get the absolute smallest file size. Use gray (8-bit) for standard black & white documents.
JPG Quality (
quality):- JPG Only. Scale from 1 to 100.
- We recommend 75-85 for a balance of sharp details and small file size. Use 90+only for photography portfolios where size doesn't matter.
Image Smoothing (
image_smoothing):- none: Default. Fastest performance.
- text: Best for documents. Smooths jagged edges on fonts for better readability.
- line: Best for blueprints and diagrams.
- image: Best for PDFs containing photos.
- all: Applies smoothing to everything. Recommended for high-quality outputs.
Converting PDFs to Images
Follow these examples to convert PDF files to images using different formats and configurations. Choose the format and settings that best match your use case.
Step 1: Convert PDF to Images
1. High-Quality Web & Display Assets (JPG & PNG)
Use these examples to generate crisp images for websites, apps, or emails.
- JPG: Ideal for general viewing. We use
quality=85andresolution=150for sharp text without bloating the file size. - PNG: Ideal for design assets. We use
profile=rgbato preserve transparency andimage_smoothing=textto ensure crisp fonts on any background.
Example 1: Web-Ready JPG (Balanced Quality)
curl -X POST "https://api.apifreaks.com/v1.0/pdf/jpg?resolution=150&quality=85&profile=rgb&output=web_images" \ -H "X-apikey: YOUR_API_KEY" \ -F "file=@/path/to/brochure.pdf"
Example 2: Transparent PNG (Selected pages only)
# Standard Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ] }curl -X POST "https://api.apifreaks.com/v1.0/pdf/png?pages=1,5-8&profile=rgba&image_smoothing=text&output=transparent_assets" \ -H "X-apikey: YOUR_API_KEY" \ -F "file=@/path/to/design_draft.pdf"
2. Professional Print & Archival Scans (TIFF & BMP)
Use these configurations for enterprise workflows, physical printing, or fax archives.
- TIFF (Print Ready): Converts the file using the
cmykcolor profile and maximum600DPI resolution, required for offset printing. - BMP (Archival): Simulates a scanned document by converting to 1-bit Black & White (
bw). This creates extremely small files perfect for faxing or long-term database storage.
Example 1: Print-Ready TIFF (CMYK, 600 DPI)
curl -X POST "https://api.apifreaks.com/v1.0/pdf/tif?resolution=600&profile=cmyk&image_smoothing=all&output=print_master" \ -H "X-apikey: YOUR_API_KEY" \ -F "file=@/path/to/marketing.pdf"
Example 2: B&W Document Scan (Smallest size for Archiving)
# Response with destroy=true (No File IDs as they are deleted right away) { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d" }curl -X POST "https://api.apifreaks.com/v1.0/pdf/bmp?resolution=300&profile=bw&image_smoothing=text&output=archive_scan" \ -H "X-apikey: YOUR_API_KEY" \ -F "file=@/path/to/invoice.pdf"
3. Thumbnails & Low-Bandwidth Previews (GIF)
Use this configuration to generate lightweight thumbnails or simple previews that load instantly on slower connections.
- GIF: Ideal for simple graphics or document previews. We use
resolution=72(standard screen DPI) andprofile=8-bit(256 colors) to keep the file size extremely small while maintaining readability for large headers and diagrams.
Example: Generate Lightweight Thumbnails (First Page Only)
# Standard Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ] }curl -X POST "https://api.apifreaks.com/v1.0/pdf/gif?pages=1&resolution=72&profile=8-bit&output=thumbnail_preview" \ -H "X-apikey: YOUR_API_KEY" \ -F "file=@/path/to/report.pdf"
- ZIP Output: All endpoints return a ZIP file containing the images (one image per page).
- Destroy Parameter: Adding
destroy=true(as seen in the Print example) deletes the input file immediately, so noinputIdsare returned in the response. - File ID: You can use the
file_idfrom theinputIdsarray to process the same file again (e.g., creating a thumbnail after a high-res conversion) without re-uploading.
Step 2: Check Task Status
After submitting a pdf to image conversion task, check its progress using the Task Status API with your taskId. The task goes through these statuses: queued, processing, completed, and failed. Monitor your task to know when the image task has finished and images are ready for download.
# Response (completed) { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "status": "completed", "createdAt": "2026-01-26 13:30:00", "zipFileUrl": "https://api.apifreaks.com/v1.0/pdf/resource/download?resource_id=9b2e7f3a-5c8d-4e1b-a6f9-0d3c8e7b2a5f", "zipFileId": "9b2e7f3a-5c8d-4e1b-a6f9-0d3c8e7b2a5f", "inputIds": [ "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f" ], "expiresAt": "2026-01-26 23:59:59" } # Response (failed) { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "status": "failed", "createdAt": "2025-01-26 10:30:00", "inputIds": [ "566dc743-d8fe-4943-8cef-61e5d3d6096c" ], "error": "Invalid PDF File", "message": "The provided file is not a valid PDF file.", "expiresAt": "2025-01-27 10:30:00" }curl -X GET "https://api.apifreaks.com/v1.0/pdf/task-status?task_id=04a06cd5-158d-4191-a45b-6f58249c599d" \ -H "X-apikey: YOUR_API_KEY"
Step 3: Download Converted Images
Once the task status shows "completed", download your converted images as a zip file using the File Download API. The zip contains one image file per converted page, named sequentially.
curl -X GET "https://api.apifreaks.com/v1.0/pdf/download?resource_id=9b2e7f3a-5c8d-4e1b-a6f9-0d3c8e7b2a5f" \ -H "X-apikey: YOUR_API_KEY" \ -o high_quality_images.zip
Webhook Support
Get automatic notifications when your task completes instead of polling the task status endpoint. Good for event-driven applications and real-time document processing.
Add webhook_urlto your request. We'll send a POST request to this URL when the task finishes (either completed or failed).
See the Complete Webhook Example section below for a full demonstration including custom authorization headers.
Webhook Delivery
Webhook delivery will be attempted up to 3 times. If all retries fail and webhook_failure_notificationis enabled, we'll send an email notification to the requesting user or their organization admin.
Custom Authorization Header
Use X-Webhook-Authorization to add a custom header to webhook requests for endpoint security.
Format: Key:Value
Example: If you send Authorization:Bearer token123, the webhook request will include: Authorization: Bearer token123
See the Complete Webhook Example below for a full demonstration.
Complete Webhook Example
Here's a complete example showing webhook integration with custom authorization header and failure notifications:
# Response { "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d", "inputIds": [ "566dc743-d8fe-4943-8cef-61e5d3d6096c" ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/pdf/jpg?webhook_url=https://yourdomain.com/webhook/pdf-to-image&webhook_failure_notification=true' \ -H 'X-apiKey: YOUR_API_KEY' \ -H 'X-Webhook-Authorization: Authorization:Bearer token123' \ -F 'file=@/path/to/document.pdf'
Webhook Request Format
When your task completes, we send a POST request to your webhook_url with these headers:
| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Signature | HMAC-SHA256 signature of the request body using your API key. Use this to verify the payload is authentic. |
| Custom Header | (If provided) Your custom header from X-Webhook-Authorization |
Webhook Response
The webhook payload contains the same response structure as the Task Status API endpoint when checked for the task ID.
Verifying Webhook Authenticity
Use the X-Signatureheader to verify webhook requests actually came from API Freaks and weren't tampered with.
How the signature works:
- We compute an HMAC-SHA256 hash of the request body using your API key as the secret
- We Base64-encode the result
- We send this as the
X-Signatureheader value
To verify the webhook:
- Take the raw payload body (JSON string exactly as received without parsing it)
- Compute HMAC-SHA256 of the payload using your API key as the secret
- Base64-encode the result of the hash
- Compare with the
X-Signatureheader value
Important:Don't transform or process the raw request body before verification. Adding whitespace or other formatting creates a different signature and verification will fail.
Pricing
To use this PDF To Image APIs, API credits are required. Charges apply only for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded. In the event of a Task Processing Error, a maximum of 200 credits will be refunded. Surcharges for additional file sizes are non-refundable.
For each successful request, 200 credits will be charged. 1 extra credit will be charged per MB beyond 50 MB.
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.