Everyone working with graphics in a serious way with a computer should be acquainted with Ghostscritpt. For those who are not, it is a an interpreter suite for PostScript and Portable Document Format: I will not cover it in depth here, but you can learn more at the related Wikipedia article or visiting the official website.
It is a very powerful and versatile tool and one could write books about, but in this post I will focus on one conversion I personally found very useful , but not particularly user-friendly.
So I am publishing this for my own exercise and with the hope of helping other users.
Take the following command:
gswin64c.exe -dNOPAUSE -dBATCH -r600 -sDEVICE=tiff24nc -sCompression=lzw -sOutputFile=scansioni%d.tif scansioni.pdf
comprised of several parts
the executable name: in this case is the 64-bit Windows one.
You should replace it with the program file appropriate for you OS and architecture
instruct the parser not to pause and ask for input at the page breaks
GS will exit at the end of the process instead of entering in interactive loop reading PostScript commands.
Please note that both -dNOPAUSE and -dBATCH can be replaced by the single -o
output resolution in DPI. Writing just one value will set vertical and horizontal resolution the same, otherwise you can use the form -rXRESxYRES
the output device, in this case a TIFF file with color depth 24bits
Other common values could be -sDEVICE=tiffgray or -sDEVICE=jpeg.
the compression to use for the TIFF file, in this case the Lempel–Ziv–Welch algorithm
the filename of the output: the use of %d will generate one file for each page in the original document appending number to the name output
the original PDF file to read from