Contents

Convert PDF to TIFF images

Using ghostscript and imagemagick to convert pdf files to tiff images.

Install GhostScript and ImageMagick

1
sudo apt install ghostscript imagemagick

Enable pdf permission

PDF read / write are disable by default. Change the config file to enable it. 1

1
<policy domain="coder" rights="read | write" pattern="PDF" />

Convert pdf to tiff

1
2
3
4
5
6
convert -density 300 \
        -compress lzw \
        -background white \
        -alpha remove \
        -trim \
        "image.pdf" "image_%d.tiff"

  1. https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion ↩︎