Posts Tagged ‘merge’

expose yourself to ghostscript

16 October 2009 Leave a comment

ghostscript is a powerful, yet slightly complicated tool.

  • it allows you to change the paper format or resolution of a pdf,
  • it allows you to convert it to other electronic formats, among which tiff
  • it allows you to change its properties, and to optimize it for different usages

in the last weeks, I’ve used gs to change the resolution of an input file, while converting it to tiff. then I’ve discovered other options, among which the one which allows me to force the output paper format. on the web you find a lot of spam about proprietary tools which allow you to do this same operation, veiling the underlying gs technology.

thus I’ve published a bash script, which supposes the existence of gs in your execution environment, and which converts any paper format to any other common paper format. I’ve named it letter2a4, since its default behavior is to change the current paper format of the input document to a4.

feel free to download it. you’ll only need to copy to /usr/local/share or wherever you like. feel equally free to read the man page for gs(1). 🙂

Update: this morning I have had also the time to write a gs wrapper to merge all the files (in the given directory|passed as arguments). Download it, if you like.

(thanks, mehul, for this idea)