Generate a monochrome PBM file (instead of a color PPM file)

pdftoppm

  • Convert PDF document pages to portable Pixmap (image formats).
    More information: <https://manned.org/pdftoppm>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

pdftoppm -mono {{path/to/file.pdf}} {{image_name_prefix}}

click the source code to copy install pdftoppm on any operating system with command-not-found.com