Skip to content

Instantly share code, notes, and snippets.

@therod
Created August 27, 2012 00:19
Show Gist options
  • Save therod/3484601 to your computer and use it in GitHub Desktop.
Save therod/3484601 to your computer and use it in GitHub Desktop.
pdf2tif
#!/usr/bin/env ruby
require 'pathname'
OPTIONS = "-q -dNOPAUSE -dBATCH -dSAFER -r300x300 -sDEVICE=tiff24nc"
INPUT = ARGV[0]
OUTPUT = File.basename(INPUT, '.*') + ".tif"
`gs #{OPTIONS} -sOutputFile="#{OUTPUT}" -c save pop -f "#{INPUT}"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment