How to convert Adobe PDF to TIF on Linux using Ghostscript

Here is the command line to convert an Adobe PDF document to TIF on Linux, in a suitable format to be used as input for the Linux version of the Softek Barcode Reader Toolkit:

For color documents:

gs -dNOPAUSE -r300 -sDEVICE=tiffscaled24 -sCompression=lzw -dBATCH -sOutputFile=output.tif input.pdf

For black and white:

gs -dNOPAUSE -r300 -sDEVICE=tiffg4 -sCompression=lzw -dBATCH -sOutputFile=output.tif input.pdf