PDF Conversion PDF conversion pdf images extract

How to Extract Images from a PDF File

Learn how to extract images from PDF files using free online tools, desktop software, and command-line utilities.

A
Admin
· May 29, 2026 · 5 min read · 2 views

Why Extracting Images from PDFs Is Trickier Than It Looks

Opening a PDF, right-clicking an image, and choosing "Save image as" often doesn't work. PDFs don't store images the way websites do — the image may be embedded as a compressed object, rendered from vector graphics, or even built from overlapping clipping paths. Understanding how images live inside PDFs explains why some methods work better than others.


Method 1: Online Tools (Easiest)

Online PDF-to-image extractors require no software installation.

Tools of PDF

Upload your PDF and use the PDF to JPG conversion tool to extract all pages as images. Each page (and the images on it) is exported as a high-quality JPG or PNG.

ILovePDF / Smallpdf

Both platforms have a "PDF to Image" tool that exports each page as an image. Free tiers handle most common extraction tasks.

Limitation: These tools export the entire page as an image, not the individual embedded image objects. For page-level extraction (when you want each page as an image), this is perfect. For extracting only specific embedded photos from a page, you need a different approach.


Method 2: Adobe Acrobat (Export Individual Images)

Adobe Acrobat Pro can export individual images embedded in the PDF.

Steps:

  1. Open the PDF in Acrobat Pro
  2. Tools → Export PDF → Image → JPEG, PNG, or TIFF
  3. Choose "Export All Images" — this exports only the embedded image objects, not the full pages

For a single image:

  1. Right-click any image in the document
  2. Select "Save Image As…" — this option is only available in Acrobat Pro (not Reader)

Why this works: Acrobat accesses the PDF's internal image stream objects directly, regardless of how they appear on the page.


Method 3: pdfimages (Command Line, Free)

pdfimages is part of the Poppler utilities — a free, open-source command-line tool available on Windows, Mac, and Linux.

Install on Windows: Download from poppler's Windows builds or install via scoop: scoop install poppler

Install on Mac:

brew install poppler

Install on Linux:

sudo apt install poppler-utils

Extract all images:

pdfimages -all document.pdf output_prefix

This creates files named output_prefix-000.jpg, output_prefix-001.png, etc.

Flags:

  • -j — force JPEG output (even for PNG images)
  • -png — force PNG output
  • -all — extract all image types including JPEG2000 and JBIG2
  • -p — add page numbers to filenames

Advantage: Extracts the raw embedded image data at its original quality, without re-compressing. This gives you the highest quality possible.


Method 4: Python with PyMuPDF (Programmatic)

For batch processing or integrating into a workflow, Python with the PyMuPDF library (also called fitz) is the most flexible approach.

Install:

pip install PyMuPDF

Script:

import fitz  # PyMuPDF
import os

pdf_path = "document.pdf"
doc = fitz.open(pdf_path)

for page_num in range(len(doc)):
    page = doc[page_num]
    images = page.get_images(full=True)

    for img_index, img in enumerate(images):
        xref = img[0]
        base_image = doc.extract_image(xref)
        image_bytes = base_image["image"]
        image_ext = base_image["ext"]

        filename = f"page{page_num+1}_img{img_index+1}.{image_ext}"
        with open(filename, "wb") as f:
            f.write(image_bytes)
        print(f"Saved: {filename}")

This script iterates through every page, finds every embedded image object, and saves it at its native format and resolution.


Method 5: Screenshot / Snipping Tool (Quick and Dirty)

For a small number of images, screenshotting is the fastest option:

Windows:

  • Open the PDF, zoom in on the image, press Win + Shift + S to open Snipping Tool
  • Select the image area and save

Mac:

  • Press Cmd + Shift + 4, drag to select the image
  • Screenshot saves to Desktop automatically

Limitation: Screenshot images are limited to screen resolution (72–96 DPI), which is lower quality than the embedded image. Fine for web use, not suitable for print.


Method 6: GIMP (for Embedded Images in Complex PDFs)

If a PDF contains embedded images that tools can't extract cleanly (due to clipping masks or compositing), GIMP can help:

  1. Open the PDF in GIMP (it renders each page as an image)
  2. Set import resolution to 300 DPI
  3. Use the Rectangle Select tool to select the image area
  4. File → Export As → save as PNG or JPEG

Understanding Image Quality in PDFs

When you extract an image from a PDF, the quality depends on what was put in:

  • If the original image was compressed before being embedded (common in web-optimised PDFs), the extracted image will be that compressed version
  • PDFs created for print typically embed images at 300 DPI or higher — extraction gives you full quality
  • PDFs created from scans embed the scan at whatever resolution it was scanned at

There is no way to get higher quality than what was embedded. Image upscaling after extraction adds pixels but not real detail.


Extracting Vector Graphics

PDF can contain vector graphics (illustrations, logos, charts) created in Illustrator, InDesign, or similar tools. pdfimages and most other tools won't extract these as vectors — they either skip them or rasterise them.

To extract vector content from a PDF:

  • Inkscape: Open the PDF in Inkscape → select the vector element → File → Save as SVG or AI
  • Adobe Illustrator: Open the PDF and access the vector paths directly

Inkscape is free and open-source; Illustrator requires a subscription.


Batch Extraction from Multiple PDFs

For extracting images from many PDFs at once:

Command line (pdfimages with a loop):

On Mac/Linux:

for f in *.pdf; do
  pdfimages -all "$f" "${f%.pdf}_img"
done

On Windows PowerShell:

Get-ChildItem *.pdf | ForEach-Object {
    pdfimages -all $_.FullName ($_.BaseName + "_img")
}

Python: Extend the PyMuPDF script above with os.listdir() or glob.glob("*.pdf") to iterate over all PDFs in a folder.


Summary

The right method depends on your needs: online tools are fastest for occasional page-level extraction; Adobe Acrobat Pro extracts individual embedded images with a right-click; pdfimages provides the highest quality and is best for batch work; Python/PyMuPDF is ideal for integration into automated workflows. For a quick one-off extraction, a screenshot works fine if screen resolution is sufficient.