Last Updated on

# PDF to TIFF Conversion using Ghostscript

## Purpose

Ephesoft uses Ghostscript to convert PDFs to single page TIF files to machine learn and test images.

## Running Ghostscript from the command line

1. Navigate to the the Ephesoft\dependencies\gs\bin (if the system is 32 bit navigate to Ephesoft\dependencies\gs32bit\bin)
2. Determine which version of Ghostscript you would like use gswin64 or gswin64c (gswin32 or gswin32c if running a on a 32bit system)
3. Open command prompt as administrator and use the following command:
{Ephesoft}\Dependencies\gs\bin\gswin64c.exe -dNOPAUSE -r300 -sDEVICE=tiffscaled24 -sCompression=lzw -dBATCH -sOutputFile="\folder\to\output-04%d.tif" "\folder\to\input.pdf">result.txt

Make sure to specify the location you want to output the TIF files and the location of the PDF you wish to convert.4.

4. After executing the command, files are outputted to the folder specified for output.

Output files are now ready to be used for machine learning and testing.