Files
cheatsheet-tldr/tldr/linux/pdftoppm
2025-03-28 00:18:38 +00:00

30 lines
833 B
Plaintext

---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pdftoppm
> Convert PDF document pages to portable Pixmap (image formats).
> More information: <https://manned.org/pdftoppm>.
- Specify the range of pages to convert (`n` - first page, `m` - last page):
`pdftoppm -f {{n}} -l {{m}} {{path/to/file.pdf}} {{image_name_prefix}}`
- Convert only the first page of a PDF:
`pdftoppm -singlefile {{path/to/file.pdf}} {{image_name_prefix}}`
- Generate a monochrome PBM file (instead of a color PPM file):
`pdftoppm -mono {{path/to/file.pdf}} {{image_name_prefix}}`
- Generate a grayscale PGM file (instead of a color PPM file):
`pdftoppm -gray {{path/to/file.pdf}} {{image_name_prefix}}`
- Generate a PNG file instead a PPM file:
`pdftoppm -png {{path/to/file.pdf}} {{image_name_prefix}}`