Convert PDF to TIFF
Convert pdf
files to tiff
images with pdftoppm
or ghostscript
.
pdftoppm¶
Install¶
To install pdftoppm
(included in poppler-utils
)123
sudo apt install poppler-utils
sudo pacman -S poppler-utils
conda install -c conda-forge poppler
Usage¶
For example, to convert the pdf file to a 300-DPI TIFF image with LZW compression.
pdftoppm -tiff -tiffcompression lzw -r 300 in.pdf out.tif
GhostScript and ImageMagick¶
Install¶
To install GhostScript and ImageMagick
sudo apt install ghostscript imagemagick
sudo pacman -S ghostscript imagemagick
choco install -y ghostscript imagemagick
Note
For security reasons, PDF read/write operations are disable by default. You enable this function by editing the settings file /etc/ImageMagick-7/policy.xml
/etc/ImageMagick-7/policy.xml
<policy domain="coder" rights="read | write" pattern="PDF" />
Usage¶
How to convert a pdf
file to a tiff
file:
convert -density 300 \
-compress lzw \
-background white \
-alpha remove \
-trim \
"image.pdf" "image_%d.tiff"