pstopnm

Convert PostScript and PDF to PNM format

TLDR

Convert PostScript to PNM
$ pstopnm [input.ps]
Convert with resolution
$ pstopnm -dpi [300] [input.ps]
Convert to specific format
$ pstopnm -ppm [input.ps]
Convert PDF
$ pstopnm [input.pdf]

SYNOPSIS

pstopnm [options] file

DESCRIPTION

pstopnm converts PostScript and PDF files to PNM format. Uses Ghostscript for rendering. Part of Netpbm toolkit for document conversion.

PARAMETERS

-dpi n

Output resolution.
-xsize n
Output width.
-ysize n
Output height.
-ppm
Force PPM output.
-pgm
Force PGM output.
-pbm
Force PBM output.
-stdout
Write to stdout.

INSTALL

sudo apt install netpbm
sudo dnf install netpbm
sudo pacman -S netpbm
sudo apk add netpbm
sudo zypper install netpbm
brew install netpbm
nix profile install nixpkgs#netpbm

SEE ALSO

gs(1), pnmtops(1)