pdfimages(1)
๐ pdfimages(1) ๐
โจ General Commands Manual โจ
๐ฆ NAME
okay so pdfimages is the Portable Document Format (PDF) image extractor (version 3.03) ๐
๐ SYNOPSIS
pdfimages [options] PDF-file image-root
๐ธ DESCRIPTION
bestie, pdfimages lowkey rescues images out of a Portable Document Format (PDF) file ๐ซถ It can save them as Portable Pixmap (PPM), Portable Bitmap (PBM), Portable Network Graphics (PNG), Tagged Image File Format (TIFF), JPEG, JPEG2000, or JBIG2 files โจ
so it reads the PDF file PDF-file, scans one or more pages, and writes one file for each image, named image-root-nnn.xxx ๐ where nnn is the image number and xxx is the image type (.ppm, .pbm, .png, .tif, .jpg, jp2, jb2e, or jb2g). ๐ And if PDF-file is -, it reads the PDF from stdin instead ๐ง
the default output format is PBM for monochrome images, or PPM for non-monochrome ones ๐ the -png or -tiff options switch the default to PNG or TIFF, respectively. if you specify both -png and -tiff, CMYK images get written as TIFF and everything else comes out as PNG ๐ and the -j, -jp2, and -jbig2 options will write JPEG, JPEG2000, and JBIG2 images from the PDF in their native format ๐ฅ
๐ OPTIONS
-f numberโ pick the first page to scan ๐ท-l numberโ pick the last page to scan ๐ท-pngโ switch the default output format to PNG ๐-tiffโ switch the default output format to TIFF ๐-jโ write JPEG images as JPEG files instead of the default format. the JPEG file is identical to the JPEG data stored in the PDF ๐ธ-jp2โ write JPEG2000 images as JP2 files instead of the default format. the JP2 file is identical to the JPEG2000 data stored in the PDF ๐ธ-jbig2โ write JBIG2 images as JBIG2 files instead of the default format. the JBIG2 data in the PDF is the embedded type ๐ฆ embedded JBIG2 can have an optional separate file holding global data. the embedded data gets the extension.jb2e, and the global data (if there is any) goes to the same image number with the extension.jb2gโจ the content of both files matches the JBIG2 data in the PDF ๐-ccittโ write CCITT images as CCITT files instead of the default format. the CCITT file is identical to the CCITT data stored in the PDF ๐ง PDF files also carry extra parameters telling you how to decode the CCITT data. those get translated into fax2tiff input options and written to a.paramsfile with the same image number ๐ the parameters are:-1โ 1D Group 3 encoding-2โ 2D Group 3 encoding-4โ Group 4 encoding-Aโ beginning of line is aligned on a byte boundary-Pโ beginning of line is not aligned on a byte boundary-X nโ the image width in pixels-Wโ encoding uses 1 for black and 0 for white-Bโ encoding uses 0 for black and 1 for white-Mโ input data fills from most significant bit to least significant bit
-allโ write JPEG, JPEG2000, JBIG2, and CCITT images in their native format ๐ซง CMYK files come out as TIFF, and all other images come out as PNG. this is the same as specifying-png -tiff -j -jp2 -jbig2 -ccitt๐-listโ no image writing here, bestie! instead it lists each image along with its info ๐ don't give an image-root with this one ๐
okay so here's what gets listed for each image:
pageโ the page number containing the imagenumโ the image numbertypeโ the image type:imageโ an opaque imagemaskโ a monochrome mask imagesmaskโ a soft-mask imagestencilโ a monochrome mask image used for painting a color or pattern
โ ๏ธ transparency in images is represented in PDF with a separate image for the image and the mask/smask. the mask/smask used as part of a transparent image always comes right after the image in the list ๐
widthโ image width (in pixels)heightโ image height (in pixels)
๐ the width/height is the size of the embedded image, NOT the size it'll be rendered at ๐ซถ
colorโ image color space:grayโ Grayrgbโ RGBcmykโ CMYKlabโ L*a*biccโ ICC Basedindexโ Indexed Colorsepโ Separationdevnโ DeviceN
compโ number of color componentsbpcโ bits per componentencโ encoding:imageโ raster image (may be Flate or LZW compressed, but doesn't use an image encoding)jpegโ Joint Photographic Experts Groupjp2โ JPEG2000jbig2โ Joint Bi-Level Image Experts Groupccittโ CCITT Group 3 or Group 4 Fax
interpโ"yes"if interpolation is to be performed when scaling up the imageobject IDโ the image dictionary object ID (number and generation)x-ppiโ the horizontal resolution of the image (in pixels per inch) when rendered on the PDF pagey-ppiโ the vertical resolution of the image (in pixels per inch) when rendered on the PDF pagesizeโ the size of the embedded image in the PDF file. the suffixes areBbytes,Kkilobytes,Mmegabytes, andGgigabytes ๐ฆratioโ the compression ratio of the embedded image ๐๏ธ
-opw passwordโ give the owner password for the PDF. doing this bypasses all security restrictions ๐ (use responsibly, bestie ๐ซถ)-upw passwordโ give the user password for the PDF ๐-pโ include page numbers in the output file names ๐ข-print-filenamesโ print the image filenames to stdout ๐จ๏ธ-qโ shh, don't print any messages or errors ๐คซ-vโ print copyright and version info ๐๏ธ-hโ print usage info. (-helpand--helpare the same thing ๐โโ๏ธ)
๐ EXIT CODES
the Xpdf tools use these exit codes, periodt:
0โ no error โ1โ error opening a PDF file ๐ฅ2โ error opening an output file ๐ฅ3โ error related to PDF permissions ๐99โ other error ๐ญ
๐ฉท AUTHOR
the pdfimages software and documentation are copyright 1998-2011 Glyph & Cog, LLC ๐
๐ง SEE ALSO
pdfdetach(1), pdffonts(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1), pdftotext(1), pdfseparate(1), pdfsig(1), pdfunite(1) ๐
okay bestie that's the whole tea ๐ซถ this page was last updated 15 August 2011, and it's all about pdfimages(1) ๐ stay iconic, and go extract some images ๐ฆโจ
๐ฆ where this page comes from
- alpine 3.22: poppler-doc 25.04.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: poppler-doc 25.12.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: poppler-doc 25.12.0-r1 ยท GPL-2.0-or-later
- debian trixie: poppler-utils 25.03.0-5+deb13u3 ยท GPL-2.0-only OR GPL-3.0-only
- debian trixie: poppler-utils 25.03.0-5+deb13u4 ยท GPL-2.0-only OR GPL-3.0-only
- fedora 43: poppler-utils 25.07.0-2.fc43 ยท (GPL-2.0-only OR GPL-3.0-only) AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
- fedora 43: poppler-utils 25.07.0-5.fc43 ยท (GPL-2.0-only OR GPL-3.0-only) AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
- fedora 44: poppler-utils 26.01.0-3.fc44 ยท (GPL-2.0-only OR GPL-3.0-only) AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: poppler-tools 25.04.0-160000.4.1 ยท GPL-2.0-only OR GPL-3.0-only
- opensuse-leap 16.0: poppler-tools 25.04.0-160000.4.1 ยท GPL-2.0-only OR GPL-3.0-only
- opensuse-leap 16.0: poppler-tools 25.04.0-160000.4.1 ยท GPL-2.0-only OR GPL-3.0-only
- opensuse-leap 16.0: poppler-tools 25.04.0-160000.4.1 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: poppler-utils 25.03.0-10
- ubuntu questing: poppler-utils 25.03.0-10ubuntu0.2 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu resolute: poppler-utils 26.01.0-2build2 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu resolute: poppler-utils 26.01.0-2ubuntu0.2
- ubuntu resolute: poppler-utils 26.01.0-2ubuntu0.3 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: poppler-utils 26.07.0-2ubuntu1 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: poppler-utils 26.07.0-2ubuntu1.1 ยท GPL-2.0-only OR GPL-3.0-only
- Copyright 1998-2011 Glyph & Cog, LLC
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms