{
    "content": [
        {
            "type": "text",
            "text": "# pdfimages(1) (man)\n\n## TLDR\n\n> Utility for extracting images from PDFs.\n\n- Extract all images from a PDF file and save them as PNGs:\n  `pdfimages -png {{path/to/file.pdf}} {{filename_prefix}}`\n- Extract images from pages 3 to 5:\n  `pdfimages -f {{3}} -l {{5}} {{path/to/file.pdf}} {{filename_prefix}}`\n- Extract images from a PDF file and include the page number in the output filenames:\n  `pdfimages -p {{path/to/file.pdf}} {{filename_prefix}}`\n- List information about all the images in a PDF file:\n  `pdfimages -list {{path/to/file.pdf}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** pdfimages - Portable Document Format (PDF) image extractor (version 3.03)\n\n**Synopsis:** pdfimages [options] PDF-file image-root\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -f | — | — | Specifies the first page to scan. |\n| -l | — | — | Specifies the last page to scan. |\n| — | — | — |  |\n| — | — | — |  |\n| -j | — | — | is identical to the JPEG data stored in the PDF. |\n| — | — | — | file is identical to the JPEG2000 data stored in the PDF. |\n| — | — | — | in PDF is of the embedded type. The embedded type of JBIG2 has an optional separate file containing global data. The emb |\n| — | — | — | file is identical to the CCITT data stored in the PDF. PDF files contain additional parameters specifying how to decode  |\n| — | — | — | written as TIFF files. All other images are written as PNG files. This is equivalent to specifying the options -png -tif |\n| — | — | — | image. Do not specify an image-root with this option. The following information is listed for each image: page the page  |\n| — | — | — | Specify the owner password for the PDF file. Providing this will bypass all security restrictions. |\n| — | — | — | Specify the user password for the PDF file. |\n| -p | — | — |  |\n| -q | — | — |  |\n| -v | — | — |  |\n| -h | --help | — |  |\n\n## See Also\n\n- pdfdetach(1)\n- pdffonts(1)\n- pdfinfo(1)\n- pdftocairo(1)\n- pdftohtml(1)\n- pdftoppm(1)\n- pdftops(1)\n- pdftotext(1)\n- pdfseparate(1)\n- pdfsig(1)\n- pdfunite(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (15 lines)\n- **OPTIONS** (1 lines) — 16 subsections\n  - -f (2 lines)\n  - -l (2 lines)\n  - -png (1 lines)\n  - -tiff (1 lines)\n  - -j (2 lines)\n  - -jp2 (2 lines)\n  - -jbig2 (6 lines)\n  - -ccitt (23 lines)\n  - -all (3 lines)\n  - -list (66 lines)\n  - -opw (3 lines)\n  - -upw (2 lines)\n  - -p (1 lines)\n  - -q (1 lines)\n  - -v (1 lines)\n  - -h -help --help (1 lines)\n- **EXIT CODES** (12 lines)\n- **AUTHOR** (2 lines)\n- **SEE ALSO** (6 lines)\n\n## Full Content\n\n### NAME\n\npdfimages - Portable Document Format (PDF) image extractor (version 3.03)\n\n### SYNOPSIS\n\npdfimages [options] PDF-file image-root\n\n### DESCRIPTION\n\nPdfimages  saves  images from a Portable Document Format (PDF) file as Portable Pixmap (PPM),\nPortable Bitmap (PBM), Portable Network Graphics (PNG),  Tagged  Image  File  Format  (TIFF),\nJPEG, JPEG2000, or JBIG2 files.\n\nPdfimages  reads the PDF file PDF-file, scans one or more pages, and writes one file for each\nimage, image-root-nnn.xxx, where nnn is the image number and xxx is  the  image  type  (.ppm,\n.pbm,  .png, .tif, .jpg, jp2, jb2e, or jb2g).  If PDF-file is ´-', it reads the PDF file from\nstdin.\n\nThe default output format is PBM (for monochrome images) or PPM for non-monochrome. The  -png\nor -tiff options change to default output to PNG or TIFF respectively. If both -png and -tiff\nare specified, CMYK images will be written as TIFF and all other images will  be  written  as\nPNG.  In  addition the -j, -jp2, and -jbig2 options will cause JPEG, JPEG2000, and JBIG2, re‐\nspectively, images in the PDF file to be written in their native format.\n\n### OPTIONS\n\n#### -f\n\nSpecifies the first page to scan.\n\n#### -l\n\nSpecifies the last page to scan.\n\n#### -png\n\n#### -tiff\n\n#### -j\n\nis identical to the JPEG data stored in the PDF.\n\n#### -jp2\n\nfile is identical to the JPEG2000 data stored in the PDF.\n\n#### -jbig2\n\nin  PDF  is  of the embedded type. The embedded type of JBIG2 has an optional separate\nfile containing global data. The embedded data is written with the extension .jb2e and\nthe  global  data (if available) will be written to the same image number with the ex‐\ntension .jb2g. The content of both these files is identical to the JBIG2 data  in  the\nPDF.\n\n#### -ccitt\n\nfile is identical to the CCITT data stored in the PDF. PDF  files  contain  additional\nparameters specifying how to decode the CCITT data. These parameters are translated to\nfax2tiff input options and written to a .params file with the same image  number.  The\nparameters are:\n\n-1     1D Group 3 encoding\n\n-2     2D Group 3 encoding\n\n-4     Group 4 encoding\n\n-A     Beginning of line is aligned on a byte boundary\n\n-P     Beginning of line is not aligned on a byte boundary\n\n-X n   The image width in pixels\n\n-W     Encoding uses 1 for black and 0 for white\n\n-B     Encoding uses 0 for black and 1 for white\n\n-M     Input data fills from most significant bit to least significant bit.\n\n#### -all\n\nwritten as TIFF files. All other images are written as PNG files.  This is  equivalent\nto specifying the options -png -tiff -j -jp2 -jbig2 -ccitt.\n\n#### -list\n\nimage. Do not specify an image-root with this option.\n\nThe following information is listed for each image:\n\npage   the page number containing the image\n\nnum    the image number\n\ntype   the image type:\n\nimage - an opaque image\nmask - a monochrome mask image\nsmask - a soft-mask image\nstencil - a monochrome mask image used for painting a color or pattern\n\nNote: Tranparency in images is represented in PDF using a separate image for the image\nand the mask/smask.  The mask/smask used as part of a transparent image always immedi‐\nately follows the image in the image list.\n\nwidth  image width (in pixels)\n\nheight image height (in pixels)\n\nNote: the image width/height is the size of the embedded image, not the size the image\nwill be rendered at.\n\ncolor  image color space:\n\ngray - Gray\nrgb - RGB\ncmyk - CMYK\nlab - L*a*b\nicc - ICC Based\nindex - Indexed Color\nsep - Separation\ndevn - DeviceN\n\ncomp   number of color components\n\nbpc    bits per component\n\nenc    encoding:\n\nimage  - raster image (may be Flate or LZW compressed but does not use an image\nencoding)\njpeg - Joint Photographic Experts Group\njp2 - JPEG2000\njbig2 - Joint Bi-Level Image Experts Group\nccitt - CCITT Group 3 or Group 4 Fax\n\ninterp \"yes\" if the interpolation is to be performed when scaling up the image\n\nobject ID\nthe image dictionary object ID (number and generation)\n\nx-ppi  The horizontal resolution of the image (in pixels per inch)  when  rendered  on\nthe pdf page.\n\ny-ppi  The  vertical resolution of the image (in pixels per inch) when rendered on the\npdf page.\n\nsize   The size of the embedded image in the pdf  file.  The  following  suffixes  are\nused: 'B' bytes, 'K' kilobytes, 'M' megabytes, and 'G' gigabytes.\n\nratio  The compression ratio of the embedded image.\n\n#### -opw\n\nSpecify  the owner password for the PDF file.  Providing this will bypass all security\nrestrictions.\n\n#### -upw\n\nSpecify the user password for the PDF file.\n\n#### -p\n\n#### -q\n\n#### -v\n\n#### -h -help --help\n\n### EXIT CODES\n\nThe Xpdf tools use the following exit codes:\n\n0      No error.\n\n1      Error opening a PDF file.\n\n2      Error opening an output file.\n\n3      Error related to PDF permissions.\n\n99     Other error.\n\n### AUTHOR\n\nThe pdfimages software and documentation are copyright 1998-2011 Glyph & Cog, LLC.\n\n### SEE ALSO\n\npdfdetach(1), pdffonts(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1),  pdftops(1),\npdftotext(1) pdfseparate(1), pdfsig(1), pdfunite(1)\n\n\n\n15 August 2011                               pdfimages(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "pdfimages",
        "section": "1",
        "mode": "man",
        "summary": "pdfimages - Portable Document Format (PDF) image extractor (version 3.03)",
        "synopsis": "pdfimages [options] PDF-file image-root",
        "tldr_summary": "Utility for extracting images from PDFs.",
        "tldr_examples": [
            {
                "description": "Extract all images from a PDF file and save them as PNGs",
                "command": "pdfimages -png {{path/to/file.pdf}} {{filename_prefix}}"
            },
            {
                "description": "Extract images from pages 3 to 5",
                "command": "pdfimages -f {{3}} -l {{5}} {{path/to/file.pdf}} {{filename_prefix}}"
            },
            {
                "description": "Extract images from a PDF file and include the page number in the output filenames",
                "command": "pdfimages -p {{path/to/file.pdf}} {{filename_prefix}}"
            },
            {
                "description": "List information about all the images in a PDF file",
                "command": "pdfimages -list {{path/to/file.pdf}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Specifies the first page to scan."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "Specifies the last page to scan."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-j",
                "long": null,
                "arg": null,
                "description": "is identical to the JPEG data stored in the PDF."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "file is identical to the JPEG2000 data stored in the PDF."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "in PDF is of the embedded type. The embedded type of JBIG2 has an optional separate file containing global data. The embedded data is written with the extension .jb2e and the global data (if available) will be written to the same image number with the ex‐ tension .jb2g. The content of both these files is identical to the JBIG2 data in the PDF."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "file is identical to the CCITT data stored in the PDF. PDF files contain additional parameters specifying how to decode the CCITT data. These parameters are translated to fax2tiff input options and written to a .params file 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."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "written as TIFF files. All other images are written as PNG files. This is equivalent to specifying the options -png -tiff -j -jp2 -jbig2 -ccitt."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "image. Do not specify an image-root with this option. The following information is listed for each image: page the page number containing the image num the image number type the image type: image - an opaque image mask - a monochrome mask image smask - a soft-mask image stencil - a monochrome mask image used for painting a color or pattern Note: Tranparency in images is represented in PDF using a separate image for the image and the mask/smask. The mask/smask used as part of a transparent image always immedi‐ ately follows the image in the image list. width image width (in pixels) height image height (in pixels) Note: the image width/height is the size of the embedded image, not the size the image will be rendered at. color image color space: gray - Gray rgb - RGB cmyk - CMYK lab - L*a*b icc - ICC Based index - Indexed Color sep - Separation devn - DeviceN comp number of color components bpc bits per component enc encoding: image - raster image (may be Flate or LZW compressed but does not use an image encoding) jpeg - Joint Photographic Experts Group jp2 - JPEG2000 jbig2 - Joint Bi-Level Image Experts Group ccitt - CCITT Group 3 or Group 4 Fax interp \"yes\" if the interpolation is to be performed when scaling up the image object 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 page. y-ppi The vertical resolution of the image (in pixels per inch) when rendered on the pdf page. size The size of the embedded image in the pdf file. The following suffixes are used: 'B' bytes, 'K' kilobytes, 'M' megabytes, and 'G' gigabytes. ratio The compression ratio of the embedded image."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specify the owner password for the PDF file. Providing this will bypass all security restrictions."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Specify the user password for the PDF file."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-q",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pdfdetach",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfdetach/1/json"
            },
            {
                "name": "pdffonts",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdffonts/1/json"
            },
            {
                "name": "pdfinfo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfinfo/1/json"
            },
            {
                "name": "pdftocairo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftocairo/1/json"
            },
            {
                "name": "pdftohtml",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftohtml/1/json"
            },
            {
                "name": "pdftoppm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftoppm/1/json"
            },
            {
                "name": "pdftops",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftops/1/json"
            },
            {
                "name": "pdftotext",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdftotext/1/json"
            },
            {
                "name": "pdfseparate",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfseparate/1/json"
            },
            {
                "name": "pdfsig",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfsig/1/json"
            },
            {
                "name": "pdfunite",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pdfunite/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-f",
                        "lines": 2,
                        "flag": "-f"
                    },
                    {
                        "name": "-l",
                        "lines": 2,
                        "flag": "-l"
                    },
                    {
                        "name": "-png",
                        "lines": 1
                    },
                    {
                        "name": "-tiff",
                        "lines": 1
                    },
                    {
                        "name": "-j",
                        "lines": 2,
                        "flag": "-j"
                    },
                    {
                        "name": "-jp2",
                        "lines": 2
                    },
                    {
                        "name": "-jbig2",
                        "lines": 6
                    },
                    {
                        "name": "-ccitt",
                        "lines": 23
                    },
                    {
                        "name": "-all",
                        "lines": 3
                    },
                    {
                        "name": "-list",
                        "lines": 66
                    },
                    {
                        "name": "-opw",
                        "lines": 3
                    },
                    {
                        "name": "-upw",
                        "lines": 2
                    },
                    {
                        "name": "-p",
                        "lines": 1,
                        "flag": "-p"
                    },
                    {
                        "name": "-q",
                        "lines": 1,
                        "flag": "-q"
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "-h -help --help",
                        "lines": 1,
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "EXIT CODES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pdfimages - Portable Document Format (PDF) image extractor (version 3.03)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pdfimages [options] PDF-file image-root\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Pdfimages  saves  images from a Portable Document Format (PDF) file as Portable Pixmap (PPM),\nPortable Bitmap (PBM), Portable Network Graphics (PNG),  Tagged  Image  File  Format  (TIFF),\nJPEG, JPEG2000, or JBIG2 files.\n\nPdfimages  reads the PDF file PDF-file, scans one or more pages, and writes one file for each\nimage, image-root-nnn.xxx, where nnn is the image number and xxx is  the  image  type  (.ppm,\n.pbm,  .png, .tif, .jpg, jp2, jb2e, or jb2g).  If PDF-file is ´-', it reads the PDF file from\nstdin.\n\nThe default output format is PBM (for monochrome images) or PPM for non-monochrome. The  -png\nor -tiff options change to default output to PNG or TIFF respectively. If both -png and -tiff\nare specified, CMYK images will be written as TIFF and all other images will  be  written  as\nPNG.  In  addition the -j, -jp2, and -jbig2 options will cause JPEG, JPEG2000, and JBIG2, re‐\nspectively, images in the PDF file to be written in their native format.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-f",
                        "content": "Specifies the first page to scan.\n",
                        "flag": "-f"
                    },
                    {
                        "name": "-l",
                        "content": "Specifies the last page to scan.\n",
                        "flag": "-l"
                    },
                    {
                        "name": "-png",
                        "content": ""
                    },
                    {
                        "name": "-tiff",
                        "content": ""
                    },
                    {
                        "name": "-j",
                        "content": "is identical to the JPEG data stored in the PDF.\n",
                        "flag": "-j"
                    },
                    {
                        "name": "-jp2",
                        "content": "file is identical to the JPEG2000 data stored in the PDF.\n"
                    },
                    {
                        "name": "-jbig2",
                        "content": "in  PDF  is  of the embedded type. The embedded type of JBIG2 has an optional separate\nfile containing global data. The embedded data is written with the extension .jb2e and\nthe  global  data (if available) will be written to the same image number with the ex‐\ntension .jb2g. The content of both these files is identical to the JBIG2 data  in  the\nPDF.\n"
                    },
                    {
                        "name": "-ccitt",
                        "content": "file is identical to the CCITT data stored in the PDF. PDF  files  contain  additional\nparameters specifying how to decode the CCITT data. These parameters are translated to\nfax2tiff input options and written to a .params file with the same image  number.  The\nparameters are:\n\n-1     1D Group 3 encoding\n\n-2     2D Group 3 encoding\n\n-4     Group 4 encoding\n\n-A     Beginning of line is aligned on a byte boundary\n\n-P     Beginning of line is not aligned on a byte boundary\n\n-X n   The image width in pixels\n\n-W     Encoding uses 1 for black and 0 for white\n\n-B     Encoding uses 0 for black and 1 for white\n\n-M     Input data fills from most significant bit to least significant bit.\n"
                    },
                    {
                        "name": "-all",
                        "content": "written as TIFF files. All other images are written as PNG files.  This is  equivalent\nto specifying the options -png -tiff -j -jp2 -jbig2 -ccitt.\n"
                    },
                    {
                        "name": "-list",
                        "content": "image. Do not specify an image-root with this option.\n\nThe following information is listed for each image:\n\npage   the page number containing the image\n\nnum    the image number\n\ntype   the image type:\n\nimage - an opaque image\nmask - a monochrome mask image\nsmask - a soft-mask image\nstencil - a monochrome mask image used for painting a color or pattern\n\nNote: Tranparency in images is represented in PDF using a separate image for the image\nand the mask/smask.  The mask/smask used as part of a transparent image always immedi‐\nately follows the image in the image list.\n\nwidth  image width (in pixels)\n\nheight image height (in pixels)\n\nNote: the image width/height is the size of the embedded image, not the size the image\nwill be rendered at.\n\ncolor  image color space:\n\ngray - Gray\nrgb - RGB\ncmyk - CMYK\nlab - L*a*b\nicc - ICC Based\nindex - Indexed Color\nsep - Separation\ndevn - DeviceN\n\ncomp   number of color components\n\nbpc    bits per component\n\nenc    encoding:\n\nimage  - raster image (may be Flate or LZW compressed but does not use an image\nencoding)\njpeg - Joint Photographic Experts Group\njp2 - JPEG2000\njbig2 - Joint Bi-Level Image Experts Group\nccitt - CCITT Group 3 or Group 4 Fax\n\ninterp \"yes\" if the interpolation is to be performed when scaling up the image\n\nobject ID\nthe image dictionary object ID (number and generation)\n\nx-ppi  The horizontal resolution of the image (in pixels per inch)  when  rendered  on\nthe pdf page.\n\ny-ppi  The  vertical resolution of the image (in pixels per inch) when rendered on the\npdf page.\n\nsize   The size of the embedded image in the pdf  file.  The  following  suffixes  are\nused: 'B' bytes, 'K' kilobytes, 'M' megabytes, and 'G' gigabytes.\n\nratio  The compression ratio of the embedded image.\n"
                    },
                    {
                        "name": "-opw",
                        "content": "Specify  the owner password for the PDF file.  Providing this will bypass all security\nrestrictions.\n"
                    },
                    {
                        "name": "-upw",
                        "content": "Specify the user password for the PDF file.\n"
                    },
                    {
                        "name": "-p",
                        "content": "",
                        "flag": "-p"
                    },
                    {
                        "name": "-q",
                        "content": "",
                        "flag": "-q"
                    },
                    {
                        "name": "-v",
                        "content": "",
                        "flag": "-v"
                    },
                    {
                        "name": "-h -help --help",
                        "content": "",
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            "EXIT CODES": {
                "content": "The Xpdf tools use the following exit codes:\n\n0      No error.\n\n1      Error opening a PDF file.\n\n2      Error opening an output file.\n\n3      Error related to PDF permissions.\n\n99     Other error.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "The pdfimages software and documentation are copyright 1998-2011 Glyph & Cog, LLC.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pdfdetach(1), pdffonts(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftoppm(1),  pdftops(1),\npdftotext(1) pdfseparate(1), pdfsig(1), pdfunite(1)\n\n\n\n15 August 2011                               pdfimages(1)",
                "subsections": []
            }
        }
    }
}