← 返回命令列表

Linux command

pdftoppm 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

pdftoppm -f [n] -l [m] [path/to/file.pdf] [image_name_prefix]

Example

pdftoppm -singlefile [path/to/file.pdf] [image_name_prefix]

Example

pdftoppm -mono [path/to/file.pdf] [image_name_prefix]

Example

pdftoppm -gray [path/to/file.pdf] [image_name_prefix]

Example

pdftoppm -png [path/to/file.pdf] [image_name_prefix]

说明

pdftoppm converts PDF document pages to image formats (PPM, PGM, PBM, PNG, JPEG, TIFF). Part of the poppler-utils package, it renders each page as a raster image at the specified resolution. Output files are named with the provided prefix followed by a page number (e.g., image-001.png). Use -singlefile for a single page without numbering. The tool is commonly used for creating thumbnails, preparing PDFs for OCR, or converting documents for image-based workflows.

参数

-f _n_
First page to convert
-l _n_
Last page to convert
-singlefile
Write only the first page, don't add page number suffix
-mono
Generate monochrome PBM output
-gray
Generate grayscale PGM output
-png
Generate PNG output
-jpeg
Generate JPEG output
-tiff
Generate TIFF output
-r _dpi_
Resolution in DPI (default: 150)
-rx _dpi_
X resolution
-ry _dpi_
Y resolution
-scale-to _size_
Scale to specified size

FAQ

What is the pdftoppm command used for?

pdftoppm converts PDF document pages to image formats (PPM, PGM, PBM, PNG, JPEG, TIFF). Part of the poppler-utils package, it renders each page as a raster image at the specified resolution. Output files are named with the provided prefix followed by a page number (e.g., image-001.png). Use -singlefile for a single page without numbering. The tool is commonly used for creating thumbnails, preparing PDFs for OCR, or converting documents for image-based workflows.

How do I run a basic pdftoppm example?

Run `pdftoppm -f [n] -l [m] [path/to/file.pdf] [image_name_prefix]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f _n_ do in pdftoppm?

First page to convert