How to Extract Embedded Images from a PDF in Their Raw Form
7 min read
You need to get photos out of a product catalog, rescue charts from a presentation, or reuse figures from a report. Taking a screenshot loses quality; saving the page as an image brings the text along too. Raw extraction lets you take the image objects embedded in a PDF in their original state.
What raw extraction does
When you see a photo on a PDF page, that photo sits in the file as a separate image object (XObject Image). The page content stream references it and says "draw at this position, at this size."
Raw extraction finds those objects and exports them as files. The critical properties:
- It comes out at original resolution. A photo that looks small on the page can be 4000 pixels wide in the file. Raw extraction gives you those 4000 pixels.
- There's no re-encoding. If the image is embedded as JPEG, it comes out as JPEG with no additional compression loss.
- Nothing else from the page comes along. Text, lines and background aren't taken.
That last point is the fundamental difference between raw extraction and "saving the page as an image."
Step 1: Determine which one you need
Two different needs get confused often:
| Need | Right operation | |---|---| | Product photos in a catalog | Raw extraction | | Charts and figures in a report | Raw extraction (won't work if vector) | | An image of the whole page | PDF to image conversion | | Page images of a scanned document | Raw extraction (one image per page) | | A page thumbnail for a presentation | PDF to image conversion | | Getting a logo as vector | PDF to SVG conversion |
That last row matters: raw extraction only takes raster (pixel) images. Logos, diagrams and charts in a PDF are usually vector — defined by line and fill commands, not embedded images. Raw extraction can't find those; SVG conversion is needed.
How to check: zoom way in on the element in the PDF. If it pixelates it's raster (raw extraction works); if it stays sharp it's vector (it won't).
Step 2: Run the extraction
Open the PDF image extraction tool and upload your file. The processing runs in your browser; your document doesn't go to a server.
The tool scans the PDF, finds the embedded image objects, and lets you download them as a ZIP archive. The number of images may be more or less than you expected — we'll get to why shortly.
Step 3: Understand the extracted files
Be ready for what you'll see when you open the ZIP. Raw extraction is "raw"; it gives you whatever is inside the PDF, and that doesn't always look the way you expected.
More files than expected. You saw one photo on the page but there are ten files in the ZIP. The reasons:
- Split images. Some PDF producers, especially scanner software, split large images into horizontal strips. They look continuous on the page but are separate objects in the file.
- Masks. A transparent image's transparency information is stored as a separate black-and-white mask image. That mask comes out as a separate file too.
- Invisible images. Images that fall outside the page, are covered by something, or lie outside the crop box also sit in the file and get extracted.
Fewer files than expected. What you thought was an image may actually be a vector drawing. Or, if the same image is used on multiple pages, it's stored once in the file and comes out as a single file.
Files that look odd. If an image is used as a transparency mask, on its own it looks like a black-and-white silhouette. That isn't a corrupted file, it's the mask itself.
Step 4: Quality and size checks
Look at these in the extracted files:
Resolution. Open the file and look at the pixel dimensions. A photo that looked small on the page can be very large in the original — that's good news, you've got a high-quality image you can reuse.
The reverse is possible too: if the image was compressed and reduced to a low resolution when the PDF was produced, raw extraction gives you that low resolution. Lost pixels don't come back.
Color space. PDFs can carry CMYK images. If the extracted file is CMYK, some programs may display the colors differently; if you'll use it on the web, you need to convert to RGB.
Transparency. An image that looked transparent in the PDF can come out opaque — because the transparency information is in a separate mask object. To recover the transparency you have to combine the image and its mask in an editor.
Orientation. The image may have been placed rotated on the page. Raw extraction gives you the original orientation, not its state on the page.
Step 5: Make corrections if needed
The extracted files may not be usable as they are. Common corrections:
Combining pieces. You'll need to bring an image split into strips together in an editor (GIMP, Photoshop, even an online tool) and merge them. You can guess the pieces' order from the numbers in the file names, but it isn't guaranteed; matching them visually is more reliable.
Applying a mask. If transparency is wanted, you have to open the main image and the mask file in an editor and apply the mask as an alpha channel.
Cropping. If only part of the image was visible in the PDF (a clipping path was applied), raw extraction gives you all of it. You'll need to crop the part you want.
Color conversion. Converting from CMYK to RGB is necessary for web use.
When to convert the page instead of extracting raw
Situations where raw extraction doesn't help:
Vector graphics. Logos, diagrams and charts are usually vector. SVG conversion is needed.
When you want text and image together. If you want an entire infographic — both the image and the labels on it — raw extraction gives you only the image part. Converting the page to PNG is the right approach.
Complex compositions. If multiple images, transparency and effects are layered on a page, taking the individual pieces won't give you the result you see. The page needs rendering.
If you only want the visible version. If you want exactly the composition you see on the page, raw extraction is the wrong tool.
The special case of scanned documents
In a scanned PDF each page consists of a single large image. Raw extraction works very efficiently here: you get one image file per page, and those are the original scan data.
That's useful when you want to reorganize a scanned document as an image archive or run the pages through an image processing pipeline.
Note: if the scan was saved as JPEG, the extracted file will be JPEG and carry the compression loss from scan time. Raw extraction doesn't fix that, it just gives it to you as-is.
A copyright warning
Being technically able to extract an image doesn't mean you have the right to use it.
Taking your own images out of your own documents is no problem. But photos and illustrations you take from someone else's catalog, book, report or presentation may be protected by copyright. Stock photos are usually purchased with specific usage licenses, and that license doesn't cover you.
If you're going to use them in commercial work, check the source and the license situation.
In summary
Raw image extraction takes the raster images embedded in a PDF at original resolution and without re-encoding. That's its fundamental difference from saving the page as an image: you get the photo, not a photo of the page. Vector graphics can't be extracted this way — those need SVG conversion. Among the extracted files you may find split images, separate mask files and content that wasn't visible on the page; those aren't errors but natural consequences of PDF's internal structure. Checking resolution, color space and transparency after extraction, and combining pieces if needed, finishes the job.
Frequently Asked Questions
What's the difference between raw extraction and saving the page as an image?
Raw extraction takes the image objects embedded in the PDF as they are — with no quality loss, at original resolution. Saving the page as an image renders the entire page (text, lines, background included) into a new picture. With the first you get just the photo; with the second, a photo of the page. If you want product photos out of a catalog, raw extraction is the right tool.
Why does the extracted image look different from what I saw in the PDF?
There can be several reasons. The image may have been scaled, rotated or cropped in the PDF — raw extraction gives you its original state, not its state on the page. A transparency mask may also have been applied to it; because the mask is a separate object, the transparency is lost in the extracted file and the background appears black or white.
Why did one photo come out split into multiple pieces?
Some PDF producers, especially scanner software and certain office programs, split large images into horizontal strips. The reason is memory efficiency. They look continuous on the page but are separate objects in the file, and raw extraction gives each of them as a separate file. To combine them you have to bring them together in an image editor.
Is it legal for me to use the images I extract?
Being technically able to extract something doesn't mean you have the right to use it. Photos, figures and illustrations inside a PDF may be protected by copyright. Taking your own images out of your own document is no problem; before using images you took from someone else's catalog, book or report, you need to check the permission or license situation.
Try this out right away with PDF'ten Görsel Çıkar (Ham).
Try PDF'ten Görsel Çıkar (Ham)