FL PDF Image Extractor
Pull the embedded images out of a PDF, not a rendered page snapshot
- images
Easy to confuse this with FL_PDFToImages, but they do genuinely different jobs. FL_PDFToImages renders each page of a PDF as a screenshot-style image - useful if you want to visually process a document. FL_PDFImageExtractor instead reaches into the PDF's internal structure and pulls out the actual embedded image objects - the photos and graphics that were placed into the document, at their original resolution, without a page's surrounding text or layout baked in. If you want the source images someone put in a PDF, not a picture of the page they're on, this is the node.
How it works
PDFs can store embedded images in several different compression formats depending on how they were originally encoded - this node handles the common ones: DCTDecode (JPEG), FlateDecode (PNG-style deflate), JPXDecode (JPEG2000), and LZWDecode. It walks every page, finds embedded image objects, decodes whichever format each one happens to be in, and filters by your minimum size thresholds so you're not pulling out tiny decorative icons or a 1×1 tracking pixel alongside the actual content images. Everything that survives the size filter comes out as a normalized batch tensor, ready to feed straight into any downstream image node.
The inputs and outputs that matter
pdf(PDF) - a Fill-Nodes PDF object, typically fromFL_PDFLoaderorFL_BulkPDFLoader.min_width/min_height(1–1000, default 100 each) - the size filter. Raise these if a PDF has a lot of small embedded icons/logos you don't want mixed in with the real content images; lower them if you're missing genuinely small images you actually wanted.- Output:
images(IMAGE) - a batch tensor of everything that was extracted and passed the size filter, in the standard[B, H, W, C]shape every other image node in ComfyUI expects.
Note this node is marked as an output node in addition to producing a batch you can chain further - it's built to be a natural endpoint in a "pull images out of a document" workflow, not just a passthrough step.
How to install it
Via ComfyUI Manager: search "ComfyUI_Fill-Nodes" and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
then restart ComfyUI. Like the rest of this pack's PDF group, expect a PyPDF2 dependency (and PDF-format decoding support for the compression types above) rather than nothing - this isn't a pure-stdlib node. The broader pack is a large, general-purpose collection from filliptm, one prolific solo author, spanning image FX, GPT/Gemini/Fal API wrappers, and an entire KSampler family alongside these PDF tools.
Common issues & troubleshooting
Nothing comes out, but you know the PDF has images. Check min_width/min_height first - the default 100×100 floor will silently drop anything smaller, which is easy to forget is even filtering.
An image you expected is missing while others extracted fine. Not every embedded-image compression scheme in the PDF spec is handled - this node covers the common ones (JPEG, deflate/PNG, JPEG2000, LZW), but an unusual or proprietary encoding could fail quietly. If one specific image consistently won't extract while others from the same document do, that's the likely explanation.
You got a whole page as one big image instead of the individual embedded photos. That's a sign you actually wanted FL_PDFToImages (page-rendering) rather than this node (embedded-object extraction) - or that the PDF was built by flattening a scanned page into one giant image rather than placing distinct image objects, in which case there's nothing finer-grained to extract; the "one image per page" is the embedded content.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| — | |||
| min_width | INT | 1001–1000 | — |
| min_height | INT | 1001–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |