{
    "mode": "man",
    "parameter": "pdftoppm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pdftoppm/1/json",
    "generated": "2026-09-01T10:57:51Z",
    "synopsis": "pdftoppm [options] PDF-file PPM-root",
    "sections": {
        "NAME": {
            "content": "pdftoppm - Portable Document Format (PDF) to Portable Pixmap (PPM) converter (version 3.03)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pdftoppm [options] PDF-file PPM-root\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Pdftoppm  converts  Portable  Document  Format  (PDF)  files to color image files in Portable\nPixmap (PPM) format, grayscale image files in Portable Graymap (PGM)  format,  or  monochrome\nimage files in Portable Bitmap (PBM) format.\n\nPdftoppm  reads  the PDF file, PDF-file, and writes one PPM file for each page, PPM-root-num‐\nber.ppm, where number is the page number.  If PDF-file is ´-', it reads  the  PDF  file  from\nstdin.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-f _",
                    "content": "Specifies the first page to convert.\n",
                    "flag": "-f"
                },
                {
                    "name": "-l _",
                    "content": "Specifies the last page to convert.\n",
                    "flag": "-l"
                },
                {
                    "name": "-o",
                    "content": "",
                    "flag": "-o"
                },
                {
                    "name": "-e",
                    "content": "",
                    "flag": "-e"
                },
                {
                    "name": "-singlefile",
                    "content": "Writes only the first page and does not add digits.\n"
                },
                {
                    "name": "-r _",
                    "content": "Specifies the X and Y resolution, in DPI.  The default is 150 DPI.\n",
                    "flag": "-r"
                },
                {
                    "name": "-rx _",
                    "content": "Specifies the X resolution, in DPI.  The default is 150 DPI.\n"
                },
                {
                    "name": "-ry _",
                    "content": "Specifies the Y resolution, in DPI.  The default is 150 DPI.\n"
                },
                {
                    "name": "-scale-to _",
                    "content": "Scales  the  long  side  of  each page (width for landscape pages, height for portrait\npages) to fit in scale-to pixels. The size of the short side will be determined by the\naspect ratio of the page.\n"
                },
                {
                    "name": "-scale-to-x _",
                    "content": "Scales each page horizontally to fit in scale-to-x pixels. If scale-to-y is set to -1,\nthe vertical size will determined by the aspect ratio of the page.\n"
                },
                {
                    "name": "-scale-to-y _",
                    "content": "Scales each page vertically to fit in scale-to-y pixels. If scale-to-x is set  to  -1,\nthe horizontal size will determined by the aspect ratio of the page.\n"
                },
                {
                    "name": "-scale-dimension-before-rotation",
                    "content": "Swaps  horizontal  and  vertical size for a rotated (landscape) pdf before scaling in‐\nstead of after.\n"
                },
                {
                    "name": "-x _",
                    "content": "Specifies the x-coordinate of the crop area top left corner\n",
                    "flag": "-x"
                },
                {
                    "name": "-y _",
                    "content": "Specifies the y-coordinate of the crop area top left corner\n",
                    "flag": "-y"
                },
                {
                    "name": "-W _",
                    "content": "Specifies the width of crop area in pixels (default is 0)\n",
                    "flag": "-W"
                },
                {
                    "name": "-H _",
                    "content": "Specifies the height of crop area in pixels (default is 0)\n",
                    "flag": "-H"
                },
                {
                    "name": "-sz _",
                    "content": "Specifies the size of crop square in pixels (sets W and H)\n"
                },
                {
                    "name": "-cropbox",
                    "content": "Uses the crop box rather than media box when generating the files\n"
                },
                {
                    "name": "-hide-annotations",
                    "content": "Do not show annotations\n"
                },
                {
                    "name": "-mono",
                    "content": ""
                },
                {
                    "name": "-gray",
                    "content": ""
                },
                {
                    "name": "-displayprofile _",
                    "content": "If poppler is compiled with colour management support, this option  sets  the  display\nprofile to the ICC profile stored in displayprofilefile.\n"
                },
                {
                    "name": "-defaultgrayprofile _",
                    "content": "If  poppler  is compiled with colour management support, this option sets the Default‐\nGray color space to the ICC profile stored in defaultgrayprofilefile.\n"
                },
                {
                    "name": "-defaultrgbprofile _",
                    "content": "If poppler is compiled with colour management support, this option sets the DefaultRGB\ncolor space to the ICC profile stored in defaultrgbprofilefile.\n"
                },
                {
                    "name": "-defaultcmykprofile _",
                    "content": "If poppler is compiled with colour management support, this option sets  the  Default‐\nCMYK color space to the ICC profile stored in defaultcmykprofilefile.\n"
                },
                {
                    "name": "-png",
                    "content": ""
                },
                {
                    "name": "-jpeg",
                    "content": ""
                },
                {
                    "name": "-jpegopt _",
                    "content": "When  used  with  -jpeg,  takes a list of options to control the jpeg compression. See\nJPEG OPTIONS for the available options.\n"
                },
                {
                    "name": "-tiff",
                    "content": ""
                },
                {
                    "name": "-tiffcompression _",
                    "content": "Specifies the TIFF compression type.  This defaults to \"none\".\n"
                },
                {
                    "name": "-freetype _",
                    "content": "Enable or disable FreeType (a TrueType / Type 1 font rasterizer).   This  defaults  to\n\"yes\".\n"
                },
                {
                    "name": "-thinlinemode _",
                    "content": "Specifies the thin line mode. This defaults to \"none\".\n\n\"solid\":\nadjust  lines  with  a width less than one pixel to pixel boundary and paint it with a\nwidth of one pixel.\n\n\"shape\":\nadjust lines with a width less than one pixel to pixel boundary and paint  it  with  a\nwidth of one pixel but with a shape in proportion to its width.\n"
                },
                {
                    "name": "-aa _",
                    "content": "Enable or disable font anti-aliasing.  This defaults to \"yes\".\n"
                },
                {
                    "name": "-aaVector _",
                    "content": "Enable or disable vector anti-aliasing.  This defaults to \"yes\".\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": "-q",
                    "content": "",
                    "flag": "-q"
                },
                {
                    "name": "-progress",
                    "content": "Print progress info as each page  is  generated.   Three  space-separated  fields  are\nprinted  to  STDERR:  the number of the current page, the number of the last page that\nwill be generated, and the path to the file written to.\n"
                },
                {
                    "name": "-sep _",
                    "content": "Specify single character separator between name and page number, default - .\n"
                },
                {
                    "name": "-forcenum",
                    "content": "Force page number even if there is only one page.\n"
                },
                {
                    "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": []
        },
        "JPEG OPTIONS": {
            "content": "When JPEG output is specified, the -jpegopt option can be used to control the  JPEG  compres‐\nsion  parameters.   It  takes a string of the form \"<opt>=<val>[,<opt>=<val>]\". Currently the\navailable options are:\n",
            "subsections": [
                {
                    "name": "quality",
                    "content": "Selects the JPEG quality value. The value must be an integer between 0 and 100.\n"
                },
                {
                    "name": "progressive",
                    "content": "Select progressive JPEG output. The possible values are \"y\", \"n\", indicating  progres‐\nsive (yes) or non-progressive (no), respectively.\n"
                },
                {
                    "name": "optimize",
                    "content": "Sets  whether to compute optimal Huffman coding tables for the JPEG output, which will\ncreate smaller files but make an extra pass over the data. The value must  be  \"y\"  or\n\"n\", with \"y\" performing optimization, otherwise the default Huffman tables are used.\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "The pdftoppm software and documentation are copyright 1996-2011 Glyph & Cog, LLC.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pdfdetach(1), pdffonts(1), pdfimages(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftops(1),\npdftotext(1) pdfseparate(1), pdfsig(1), pdfunite(1)\n\n15 August 2011                                pdftoppm(1)",
            "subsections": []
        }
    },
    "summary": "pdftoppm - Portable Document Format (PDF) to Portable Pixmap (PPM) converter (version 3.03)",
    "flags": [
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "Specifies the first page to convert."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "Specifies the last page to convert."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Writes only the first page and does not add digits."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "Specifies the X and Y resolution, in DPI. The default is 150 DPI."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specifies the X resolution, in DPI. The default is 150 DPI."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specifies the Y resolution, in DPI. The default is 150 DPI."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Scales the long side of each page (width for landscape pages, height for portrait pages) to fit in scale-to pixels. The size of the short side will be determined by the aspect ratio of the page."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Scales each page horizontally to fit in scale-to-x pixels. If scale-to-y is set to -1, the vertical size will determined by the aspect ratio of the page."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Scales each page vertically to fit in scale-to-y pixels. If scale-to-x is set to -1, the horizontal size will determined by the aspect ratio of the page."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Swaps horizontal and vertical size for a rotated (landscape) pdf before scaling in‐ stead of after."
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "Specifies the x-coordinate of the crop area top left corner"
        },
        {
            "flag": "-y",
            "long": null,
            "arg": null,
            "description": "Specifies the y-coordinate of the crop area top left corner"
        },
        {
            "flag": "-W",
            "long": null,
            "arg": null,
            "description": "Specifies the width of crop area in pixels (default is 0)"
        },
        {
            "flag": "-H",
            "long": null,
            "arg": null,
            "description": "Specifies the height of crop area in pixels (default is 0)"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specifies the size of crop square in pixels (sets W and H)"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Uses the crop box rather than media box when generating the files"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Do not show annotations"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If poppler is compiled with colour management support, this option sets the display profile to the ICC profile stored in displayprofilefile."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If poppler is compiled with colour management support, this option sets the Default‐ Gray color space to the ICC profile stored in defaultgrayprofilefile."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If poppler is compiled with colour management support, this option sets the DefaultRGB color space to the ICC profile stored in defaultrgbprofilefile."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If poppler is compiled with colour management support, this option sets the Default‐ CMYK color space to the ICC profile stored in defaultcmykprofilefile."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "When used with -jpeg, takes a list of options to control the jpeg compression. See JPEG OPTIONS for the available options."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specifies the TIFF compression type. This defaults to \"none\"."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Enable or disable FreeType (a TrueType / Type 1 font rasterizer). This defaults to \"yes\"."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specifies the thin line mode. This defaults to \"none\". \"solid\": adjust lines with a width less than one pixel to pixel boundary and paint it with a width of one pixel. \"shape\": adjust lines with a width less than one pixel to pixel boundary and paint it with a width of one pixel but with a shape in proportion to its width."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Enable or disable font anti-aliasing. This defaults to \"yes\"."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Enable or disable vector anti-aliasing. This defaults to \"yes\"."
        },
        {
            "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": "-q",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print progress info as each page is generated. Three space-separated fields are printed to STDERR: the number of the current page, the number of the last page that will be generated, and the path to the file written to."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specify single character separator between name and page number, default - ."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Force page number even if there is only one page."
        },
        {
            "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": "pdfimages",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pdfimages/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": "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"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert PDF document pages to portable Pixmap (image formats).",
        "examples": [
            {
                "description": "Specify the range of pages to convert (`n` - first page, `m` - last page)",
                "command": "pdftoppm -f {{n}} -l {{m}} {{path/to/file.pdf}} {{image_name_prefix}}"
            },
            {
                "description": "Convert only the first page of a PDF",
                "command": "pdftoppm -singlefile {{path/to/file.pdf}} {{image_name_prefix}}"
            },
            {
                "description": "Generate a monochrome PBM file (instead of a color PPM file)",
                "command": "pdftoppm -mono {{path/to/file.pdf}} {{image_name_prefix}}"
            },
            {
                "description": "Generate a grayscale PGM file (instead of a color PPM file)",
                "command": "pdftoppm -gray {{path/to/file.pdf}} {{image_name_prefix}}"
            },
            {
                "description": "Generate a PNG file instead a PPM file",
                "command": "pdftoppm -png {{path/to/file.pdf}} {{image_name_prefix}}"
            }
        ]
    }
}