Extract Images from PDF API
Extract all images from PDF documents programmatically. Get full-resolution PNGs and JPGs with metadata in a single API call. Perfect for content management systems, digital asset libraries, and design workflows. Pair with our PDF extraction API for complete document parsing.
No credit card required • Free tier available
Extract Images API Example
REST APIcurl -X POST "https://api.xspdf.com/v1/extract/images" \
-H "Authorization: Bearer $API_KEY" \
-d '{"input_url":"https://files.example.com/catalog.pdf","options":{"output_format":"png","min_width":100,"min_height":100}}' Speed
360ms
Success
99.95%
Options
8+
8,700+
Active Teams
360ms
Median Latency
99.95%
Success Rate
45M+
Images Extracted
Extracting Images From PDFs Shouldn't Be Manual
Marketing teams need product images from catalogs. Developers need design assets from proposals. Content managers need photos from reports. But extracting images manually is slow and error-prone.
Manual Extraction Wastes Hours
Right-clicking to save images from PDFs one at a time. Using screenshot tools with poor quality. Opening PDFs in Photoshop to export layers. Every catalog or report requires hours of manual work.
Quality Loss From Screenshots
Screenshot tools lose resolution and introduce compression artifacts. You need original high-resolution images for print and web. PDF viewers don't export at native resolution. Quality degradation ruins professional assets.
No Automation for Content Systems
Your CMS needs product images from vendor catalogs. Your DAM needs photos from marketing PDFs. Your website needs graphics from reports. But there's no API to extract images automatically at scale.
The Hidden Cost of Manual Image Extraction
A content manager making $55,000/year spends 8 hours weekly extracting images from PDFs. That's $11,000 annually in labor. Add lost productivity from context switching, quality issues from low-resolution exports, and delayed campaigns waiting for assets. Total annual cost for a 3-person team: $38,000+.
xspdf extracts all images automatically for $99/month. Process 500 PDFs per month, get full-resolution outputs instantly. ROI in the first week.
Extract All Images in One API Call
Upload a PDF, get back URLs to every image at full resolution. Choose PNG or JPG output. Filter by minimum dimensions. Extract metadata like DPI and color space.
Full-Resolution Extraction
Get images at their native resolution from the PDF. No quality loss from re-rendering or screenshots. Original color profiles and transparency preserved. Perfect for print and high-DPI displays.
Smart Filtering
Set minimum width and height to exclude tiny icons and decorative elements. Filter by DPI to get only high-quality images. Skip images smaller than your requirements automatically.
Rich Metadata
Get dimensions, DPI, color space, file format, page number, and position for every image. Perfect for content systems that need complete asset information. Index and organize extracted images automatically.
Python SDK Example
pip install xspdfresponse = requests.post(
"https://api.xspdf.com/v1/extract/images",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"input_url": "https://files.example.com/catalog.pdf",
"options": {
"output_format": "png",
"min_width": 100,
"min_height": 100
}
}
)
images = response.json()["images"] Response in 360ms
{
"images": [
{"url": "https://files.xspdf.com/img1.png", "width": 1920, "height": 1080, "page": 1},
{"url": "https://files.xspdf.com/img2.png", "width": 800, "height": 600, "page": 3}
],
"total_images": 2
} Advanced Image Extraction Features
Professional-grade image extraction with complete control over output format and quality.
Format Selection
Export as PNG for transparency and lossless quality, or JPG for smaller file sizes. Set JPG quality level. API automatically converts and optimizes for your chosen format.
Size Filtering
Set min_width and min_height to filter out small icons, logos, and decorative elements. Extract only images that meet your size requirements. Save bandwidth and storage automatically.
Page-Level Extraction
Extract images from specific pages only. Use page_ranges: "1-5" to extract from first five pages. Get page numbers for each image in response metadata.
DPI & Quality Info
Get DPI information for every extracted image. Filter images by minimum DPI for print-quality assets. Response includes color space, bit depth, and compression details.
Position Metadata
Response includes X/Y coordinates and dimensions for each image's position on the page. Perfect for recreating layouts or understanding document structure programmatically.
Batch Processing
Extract images from hundreds of PDFs via batch endpoint. Webhook notifications when extraction completes. Parallel processing for enterprise-scale workloads.
Frequently Asked Questions
Everything you need to know about extracting images from PDFs.
Do you extract images at their original resolution?
Yes. We extract images at their native resolution from the PDF without any re-rendering or quality loss. If an image is 4K in the PDF, you get a 4K image out. Color profiles, transparency, and metadata are preserved exactly as embedded.
Can I filter out small icons and decorative images?
Yes. Use min_width and min_height parameters to exclude images below your threshold. For example, "min_width": 200, "min_height": 200 skips anything smaller than 200x200 pixels. Perfect for extracting only content images and skipping logos or icons.
What image formats are supported for output?
PNG and JPG. Use PNG for lossless quality and transparency preservation. Use JPG for smaller file sizes with adjustable quality (1-100). Set "output_format": "png" or "jpg" in your request. The API converts automatically while preserving maximum quality.
How do I know which page each image came from?
The API response includes page numbers for every image. Each image object contains: {"url": "...", "width": 1920, "height": 1080, "page": 3}. You also get X/Y coordinates showing the image's position on that page.
Can I extract images from password-protected PDFs?
Yes. Include the password in your request: "password": "your_pdf_password". We decrypt the PDF, extract images, and return results normally. The password is never stored. Works with both user passwords and owner passwords.
Start Extracting Images Today
Free tier includes 50 extractions per month. No credit card required. Upgrade anytime as you scale.
Related APIs