Skip to content

Instantly share code, notes, and snippets.

@pushcx
Created May 7, 2013 19:15
Show Gist options
  • Save pushcx/5535312 to your computer and use it in GitHub Desktop.
Save pushcx/5535312 to your computer and use it in GitHub Desktop.
command to convert pdf into tiffs
mkdir pages
gs -sDEVICE=pnggray -sOutputFile=pages/p%05d.png -r600 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dBATCH -dNOPAUSE -dSAFER -f filename.pdf -c quit
-sDEVICE is formatting, load ghostscript and run 'devicenames ==' to print the full list. 'tiffgray' for tiff
-sOutputFile is filename, can have paths, basic printf formatting for page number
-r is resolution, 150 is human reading, 300 is ocr/print, 600 is art printing
Don't need to edit later parameters except 'filename.pdf'
-AlphaBits are antialiasing, rest just gets it running on all pages non-interactively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment