pdftopng(1)
π pdftopng β the glow-up your PDFs have been waiting for π
okay bestie, sit down, hydrate, and let me tell you about pdftopng, a whole icon from the General Commands Manual collection. it's the PDF-to-PNG converter, version 4.06, and it literally just... does the thing. no cap.
β¨ NAME β¨
pdftopng β Portable Document Format (PDF) to Portable Network Graphics (PNG) converter (version 4.06)
πΈ SYNOPSIS πΈ
pdftopng [options] PDF-file PNG-root
π¦ DESCRIPTION π¦
so here's the vibe: pdftopng takes your Portable Document Format (PDF) files and turns them into color, grayscale, or monochrome image files in Portable Network Graphics (PNG) format. that's the whole main character arc.
it reads the PDF file, PDF-file, and then writes one PNG file for every single page β named PNG-root-nnnnnn.png, where nnnnnn is the page number. one page, one file, no skipping, no favorites. π
and if PNG-root is -, the image gets sent to stdout instead. ngl though, that's probably only useful when you're converting a single page β like, imagine piping a 400-page PDF through there, chaos. π
π CONFIGURATION FILE π
pdftopng reads a configuration file at startup, because it's a little extra like that. first it tries to find your private config file, ~/.xpdfrc. if that one doesn't exist, it goes looking for a system-wide config file β typically /etc/xpdfrc (though this location can be changed when pdftopng is built, iykyk).
for all the juicy details, go read the xpdfrc(5) man page. π«Ά
π OPTIONS π
a bunch of these can also be set with configuration file commands β those are listed in square brackets next to the matching command line option, so you always know who's who. β¨
-fnumber β specifies the first page to convert.-lnumber β specifies the last page to convert.-rnumber β specifies the resolution, in DPI. the default is150 DPI.-monoβ generate a monochrome image (instead of a color image).-grayβ generate a grayscale image (instead of a color image).-alphaβ generate an alpha channel in the PNG file. this is only useful with PDF files that have been constructed with a transparent background. also, important: the-alphaflag cannot be used with-mono. pick a lane, babe. π-rotangle β rotate pages by0(the default),90,180, or270degrees.-freetype yes | noβ enable or disable FreeType (a TrueType / Type 1 font rasterizer). this defaults to"yes". [config file:enableFreeType]-aa yes | noβ enable or disable font anti-aliasing. this defaults to"yes". [config file:antialias]-aaVector yes | noβ enable or disable vector anti-aliasing. this defaults to"yes". [config file:vectorAntialias]-opwpassword β specify the owner password for the PDF file. providing this will bypass all security restrictions. (slay, but also, respectfully, use this power wisely π₯)-upwpassword β specify the user password for the PDF file.-verboseβ print a status message (to stdout) before processing each page. [config file:printStatusInfo]-qβ don't print any messages or errors. silent treatment, but make it functional. [config file:errQuiet]-cfgconfig-file β readconfig-filein place of~/.xpdfrcor the system-wide config file.-vβ print copyright and version information.-hβ print usage information. (-helpand--helpare equivalent.)
β EXIT CODES β
the Xpdf tools use these exit codes, and they are iconic in their simplicity:
0β No error. (we love a clean exit π)1β Error opening a PDF file.2β Error opening an output file.3β Error related to PDF permissions.98β Out of memory.99β Other error.
π AUTHOR π
the pdftopng software and documentation are copyright 1996-2025 Glyph & Cog, LLC. periodt.
π SEE ALSO π
xpdf(1), pdftops(1), pdftotext(1), pdftohtml(1), pdfinfo(1), pdffonts(1), pdfdetach(1), pdftoppm(1), pdfimages(1), xpdfrc(5)
ok that's the whole page bestie, go forth and convert π
and that's a wrap on this little saga β brought to you from the 14 Nov 2025 edition of the pdftopng(1) manual page. mwah. π
β¨π
π¦ where this page comes from
- arch rolling: xpdf 4.06-2 Β· GPL-2.0-only OR GPL-3.0-only
- fedora 43: xpdf 1:4.06-1.fc43 Β· (GPL-2.0-only OR GPL-3.0-only) AND BSD-3-Clause
- fedora 43: xpdf 1:4.06-1.fc43 Β· (GPL-2.0-only OR GPL-3.0-only) AND BSD-3-Clause
- fedora 44: xpdf 1:4.06-2.fc44 Β· (GPL-2.0-only OR GPL-3.0-only) AND BSD-3-Clause
- fedora 44: xpdf 1:4.06-2.fc44 Β· (GPL-2.0-only OR GPL-3.0-only) AND BSD-3-Clause
- nixpkgs unstable: xpdf 4.06
- Copyright 2017-2025 Glyph & Cog, LLC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms