To extract images from a PDF in Python, you typically install a library such as PyMuPDF or pdfplumber, iterate through the document's image XObjects, and write each bitmap to disk; a browser tool can perform the same extraction on a single local PDF without installing Python or uploading the file. The job is identical in both worlds: locate image dictionaries inside the PDF, decide what their filter bytes actually represent, and write a usable image file. A DCTDecode stream is already a JPEG payload, so the tool can save the raw bytes untouched. A simple FlateDecode stream over 8-bit DeviceRGB or DeviceGray pixels is not a complete image file on its own, so the browser inflates it locally and encodes a PNG that ordinary apps can open. Anything more exotic, including JPX, JBIG2, LZW, indexed palettes, CMYK, masks, and predictor chains, is reported as skipped rather than force-decoded with wrong colors. Choosing between the Python code path and the browser path is mostly a question of how often you need to run the job and whether you want to manage dependencies on the machine doing the work.

Python or Browser: Picking the Right Path for PDF Image Extraction
Both approaches inspect the same underlying structure: a PDF stores images as indirect objects called image XObjects, each tagged with a filter entry that names the encoding scheme. Python libraries expose those objects so a script can read the filter, decompress the stream, and save the bytes. The browser tool does the same inspection with pdf-lib, then applies its supported-encoding policy inside the current tab. The trade-off is not about quality — for supported encodings, both paths produce the same files — but about workflow and overhead.
- Run the job once on a single document, on a machine without Python installed, and the browser tool is faster to set up than a fresh virtual environment.
- Run the job repeatedly across hundreds of documents, integrate it into a data pipeline, or post-process each image programmatically, and a Python script gives you control, batching, and reproducibility.
- Need a snapshot of the page including text and vector artwork rather than the original embedded asset? A page converter is the correct tool, not either of these.
What the Browser Tool Recognizes Inside the PDF
The browser tool recognizes two bounded cases out of the many ways a PDF can store image data. DCTDecode is the PDF specification's name for an embedded JPEG stream; the bytes already follow the JPEG file format, so the tool exports them as a JPG without re-rendering or recompressing and the downloaded file matches the image payload stored inside the PDF. FlateDecode with 8-bit DeviceRGB or DeviceGray is a zlib-compressed raw pixel array. Those bytes are not a standalone image file, so the browser tool inflates them with a DecompressionStream, places the pixels on a local canvas, and encodes a PNG for download.
Everything else is intentionally skipped. The table below summarizes the encodings you will encounter and what the tool does with each.
| Encoding or property | What it is | Tool behavior |
|---|---|---|
| DCTDecode | Embedded JPEG stream | Exported as JPG, original bytes preserved |
| FlateDecode, 8-bit DeviceRGB | Raw RGB pixels, zlib-compressed | Inflated and encoded as PNG |
| FlateDecode, 8-bit DeviceGray | Raw grayscale pixels, zlib-compressed | Inflated and encoded as PNG |
| JPXDecode | JPEG 2000 stream | Skipped |
| JBIG2 | Bi-level image compression | Skipped |
| LZW, RunLength, CCITTFax | Other compression filters | Skipped |
| Indexed, CMYK, Separation, DeviceN | Non-RGB color spaces | Skipped |
| Any image with a soft mask or image mask | Masked image XObject | Skipped |
Skipped items are listed in the results so you can see exactly what the tool could not decode. This is described in the Adobe PDF Reference under image dictionaries and filters, and it is the same set of cases most Python libraries warn about when they encounter an unsupported stream.
Pull Images Out of a PDF in Your Browser
- Open Extract Images from PDF and choose one local PDF up to 25 MB from your device.
- Click Extract images to start scanning the bounded image objects inside the file. Scanning, decoding, PNG encoding, and download creation all happen in your current tab.
- Wait for the scan to finish. The tool reports the format and pixel dimensions for every embedded image it could read.
- Download each supported JPG or PNG individually using the link next to its entry.
- If the result list includes skips, decide whether you need a full page snapshot from a different tool or whether the skipped images are essential to your task.
Safety Limits and Skip Rules
The browser applies hard budgets before allocating output buffers so a single image cannot exhaust the tab's memory. The maximum PDF size is 25 MB, the maximum dimension per image is 12,000 pixels on the longest side, the maximum pixels per image is 40 megapixels, the total pixels across the document is 100 megapixels, and the maximum decoded Flate payload is 100 MB. A PDF that exceeds any of these limits will not produce partial downloads of oversized assets; the affected image is reported as skipped.
Repeated indirect references, meaning the same image drawn on several pages, are inspected once and listed once, so one stored asset does not become a confusing set of duplicate downloads. A password-protected, malformed, or unusually complex PDF can still fail. The tool does not bypass encryption, repair a broken file, validate a signature, or make a claim that the source document is trustworthy. Use it when you need a photograph, logo, scan, or graphic that was placed in a PDF and you want the embedded asset rather than a page screenshot.
When a Page Snapshot Is the Better Choice
There is a real distinction between exporting an embedded image object and rendering a page. The browser tool described above looks for image data stored inside the document itself. A page-snapshot tool renders everything visible on the page, including text, vector artwork, and any image that does not fall into the two supported cases, into a raster picture. If your PDF contains JPEG 2000 images, CMYK scans, or images hidden behind soft masks, a page snapshot will capture them visually even though the embedded-export path will skip them. Use the embedded-export tool when you want the original asset; use PDF To PNG or PDF to JPG Converter when you want the complete visible page.
Python Libraries You Would Have Used Instead
If you do prefer the code path, the libraries that dominate current Python PDF image extraction each take a slightly different angle. PyMuPDF, imported as fitz, is fast and broad; it can render pages to pixmaps when you need a snapshot and can also iterate raw image objects. pdfplumber is positioned as a PDF parser with image location metadata and pairs well with Pillow for output formatting. pypdf is pure Python with no native dependencies and handles straightforward DCT extraction well. pikepdf is built on the C++ QPDF library and tackles complex streams and modern filter chains that the others sometimes refuse.
Each of these exposes image XObjects through its API and decides what to do with unsupported encodings in its own way. The browser tool is roughly equivalent to the DCTDecode path of pypdf plus the FlateDecode RGB and Gray path of pdfplumber, with the safety budgets applied before any canvas allocation. If you want a deeper walk-through of the underlying mechanics, the pdf-lib PDFRawStream source shows how a stream's filter list and decode parameters are parsed before bytes are exposed.
Verify the Downloaded Image Matches the Source
Because the tool keeps DCTDecode bytes untouched and only re-encodes simple FlateDecode pixels as PNG, the downloaded file is the closest possible match to the embedded asset the PDF was carrying. After download, open the file in any image viewer and confirm the subject matches what you saw on the page, then read the dimensions reported next to the entry and compare them against the viewer's reported size. If the file looks wrong, the source PDF may rely on a soft mask, an ICC profile, or a color space the tool does not decode; fall back to a page snapshot in that case. For more on preserving quality when you need a single high-resolution asset, the guide on copying an image from a PDF without losing quality walks through the trade-offs in detail.
Keep the original PDF alongside the downloaded files until you have confirmed the assets match. Temporary download URLs are released when you choose another file or leave the tool, so do not bookmark them for later.
Related reading: Extract Pages from PDF: A Beginner's Step-by-Step Guide.