pdftoppm(1)
โจ NAME โจ
okay so this is pdftoppm(1) from the General Commands Manual ๐ bestie, it's the tool that turns PDFs into images ๐
pdftoppm - Portable Document Format (PDF) to Portable Pixmap (PPM) converter (version 3.03) ๐ฆ
๐ง SYNOPSIS ๐ง
pdftoppm [options] PDF-file PPM-root
๐ DESCRIPTION ๐
okay so pdftoppm converts PDF files into color images in PPM format ๐ or grayscale images in PGM format ๐ฉถ, or monochrome images in PBM format ๐ค. no cap, that's three slays in one โจ
it reads the PDF file, PDF-file, and writes one PPM file per page, named PPM-root-number.ppm, where number is the page number ๐ if PDF-file is -, it reads the PDF straight from stdin, so you can pipe stuff in ๐ซถ
๐ธ OPTIONS ๐ธ
-f numberโ choose the first page to convert ๐-l numberโ choose the last page to convert ๐-oโ only the odd numbered pages get generated ๐ฆ-eโ only the even numbered pages get generated ๐ฆ-singlefileโ writes just the first page and doesn't add digits to the name ๐-r numberโ sets the X and Y resolution in DPI ๐ฅ the default is 150 DPI, lowkey perfect-rx numberโ sets just the X resolution in DPI ๐ฅ default is 150 DPI-ry numberโ sets just the Y resolution in DPI ๐ฅ default is 150 DPI-scale-to numberโ scales the long side of each page (width for landscape pages, height for portrait pages) to fit innumberpixels โจ the short side then follows the page's aspect ratio, so nothing gets squished ๐-scale-to-x numberโ scales each page horizontally to fit innumberpixels โจ if-scale-to-yis set to-1, the vertical size is worked out from the page's aspect ratio ๐ง-scale-to-y numberโ scales each page vertically to fit innumberpixels โจ if-scale-to-xis set to-1, the horizontal size is worked out from the aspect ratio ๐ง-scale-dimension-before-rotationโ swaps the horizontal and vertical size for a rotated (landscape) PDF before scaling instead of after ๐-x numberโ the x-coordinate of the crop area's top left corner ๐ฏ-y numberโ the y-coordinate of the crop area's top left corner ๐ฏ-W numberโ the width of the crop area in pixels (default is0) ๐-H numberโ the height of the crop area in pixels (default is0) ๐-sz numberโ the size of the crop square in pixels, and it sets bothWandH๐-cropboxโ uses the crop box instead of the media box when making the files ๐ผ๏ธ-hide-annotationsโ annotations stay hidden ๐-monoโ makes a monochrome PBM file instead of a color PPM file ๐ค-grayโ makes a grayscale PGM file instead of a color PPM file ๐ฉถ-displayprofile displayprofilefileโ if poppler was built with colour management support, this sets the display profile to the ICC profile indisplayprofilefile๐จ-defaultgrayprofile defaultgrayprofilefileโ if poppler was built with colour management support, this sets the DefaultGray color space to the ICC profile indefaultgrayprofilefile๐จ-defaultrgbprofile defaultrgbprofilefileโ if poppler was built with colour management support, this sets the DefaultRGB color space to the ICC profile indefaultrgbprofilefile๐จ-defaultcmykprofile defaultcmykprofilefileโ if poppler was built with colour management support, this sets the DefaultCMYK color space to the ICC profile indefaultcmykprofilefile๐จ-pngโ makes a PNG file instead of a PPM file ๐-jpegโ makes a JPEG file instead of a PPM file ๐-jpegopt jpeg-optionsโ used with-jpeg, this takes a list of options to control the JPEG compression ๐ซถ see JPEG OPTIONS below for what's available-tiffโ makes a TIFF file instead of a PPM file ๐-tiffcompression none | packbits | jpeg | lzw | deflateโ picks the TIFF compression type ๐๏ธ it defaults to"none"-freetype yes | noโ turns FreeType on or off (it's the TrueType / Type 1 font rasterizer) ๐ค it defaults to"yes"-thinlinemode none | solid | shapeโ sets the thin line mode ๐ it defaults to"none""solid"โ lines thinner than one pixel get snapped to the pixel boundary and painted one pixel wide ๐"shape"โ lines thinner than one pixel get snapped to the pixel boundary and painted one pixel wide, but with a shape in proportion to their width ๐โจ
-aa yes | noโ turns font anti-aliasing on or off ๐๏ธ it defaults to"yes"-aaVector yes | noโ turns vector anti-aliasing on or off ๐๏ธ it defaults to"yes"-opw passwordโ the owner password for the PDF ๐ giving this bypasses all security restrictions, so use it wisely ๐-upw passwordโ the user password for the PDF ๐-qโ shh, no messages or errors get printed ๐คซ-progressโ prints progress info as each page is generated ๐ three space-separated fields go 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-sep charโ a single character separator between the name and the page number ๐งฉ default is--forcenumโ forces a page number even when there's only one page ๐ข-vโ prints copyright and version info ๐-hโ prints usage info ๐งพ (-helpand--helpdo the exact same thing)
๐ฆ EXIT CODES ๐ฆ
okay so the Xpdf tools use these exit codes:
0โ no error, we slay ๐1โ error opening a PDF file ๐2โ error opening an output file ๐3โ error related to PDF permissions ๐99โ some other error ๐
๐ JPEG OPTIONS ๐
when JPEG output is on, the -jpegopt option controls the JPEG compression parameters โจ it takes a string of the form "<opt>=<val>[,<opt>=<val>]". right now these are the available options:
qualityโ picks the JPEG quality value ๐จ it has to be an integer between0and100progressiveโ turns progressive JPEG output on or off ๐ the possible values are"y"(progressive, yes) or"n"(non-progressive, no)optimizeโ decides whether to compute optimal Huffman coding tables for the JPEG output ๐ง this makes smaller files but makes an extra pass over the data ๐ the value must be"y"or"n", with"y"doing the optimization, and otherwise the default Huffman tables get used
๐ซถ AUTHOR ๐ซถ
the pdftoppm software and documentation are copyright 1996-2011 Glyph & Cog, LLC ๐
๐ SEE ALSO ๐
pdfdetach(1), pdffonts(1), pdfimages(1), pdfinfo(1), pdftocairo(1), pdftohtml(1), pdftops(1), pdftotext(1), pdfseparate(1), pdfsig(1), pdfunite(1) ๐
bestie, that's the whole pdftoppm(1) page ๐ฆ last updated 15 August 2011, so it's a little vintage, but still iconic ๐ โจ
๐ฆ 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
- arch rolling: poppler 26.10.0-2 ยท GPL-2.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND HPND-sell-variant
- centos-stream 10: poppler-utils 24.02.0-10.el10 ยท (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
- debian bookworm: poppler-utils 22.12.0-2+deb12u2 ยท GPL-2.0-only OR GPL-3.0-only
- debian bookworm: poppler-utils 22.12.0-2+deb12u3 ยท GPL-2.0-only OR GPL-3.0-only
- 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
- nixos 26.05: poppler-utils 26.10.0
- nixpkgs unstable: poppler-utils 26.10.0
- 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 jammy: poppler-utils 22.02.0-2 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu jammy: poppler-utils 22.02.0-2ubuntu0.14
- ubuntu jammy: poppler-utils 22.02.0-2ubuntu0.15 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu noble: poppler-utils 24.02.0-1ubuntu9 ยท GPL-2.0-only OR GPL-3.0-only
- ubuntu noble: poppler-utils 24.02.0-1ubuntu9.10
- ubuntu noble: poppler-utils 24.02.0-1ubuntu9.11 ยท 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 2005-2011 Glyph & Cog, LLC
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms