Created
February 19, 2009 19:07
-
-
Save noah/67055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# a small ghostscript wrapper to convert | |
# multiple pdf files into one single pdf | |
# 20090219 Noah K. Tilton <noah@downbe.at> | |
if ARGV.length < 1 | |
puts "Usage: ./#{$0} <input pdf,[. . .]> <output pdf>" | |
exit | |
end | |
gs = `which gs`.chomp! | |
out = ARGV.pop | |
system("#{gs} -q -dNOPAUSE -dQUIET -sDEVICE=pdfwrite -sOutputFile=#{out} #{ARGV.join(' ')} -c quit") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment