Revision 118

Date:
2009/07/22 11:49:31
Author:
dpavlin
Revision Log:
quickly convert pdf to jpeg using ghostscript
Files:

Legend:

 
Added
 
Removed
 
Modified
  • trunk/pdf2jpeg.sh

     
    1 #!/bin/sh -x
    2
    3 # http://www.linuxjournal.com/content/tech-tip-using-ghostscript-convert-and-combine-files
    4
    5 test -z "$1" && echo "Usage: $0 file.pdf [/tmp/]" && exit
    6
    7 dir=$2
    8 test -z "$dir" && dir=/tmp/
    9
    10 gs -sDEVICE=jpeg \
    11 -dNOPAUSE -dBATCH -dSAFER \
    12 -r600x600 \
    13 -sOutputFile=$dir/p%08d.jpg \
    14 $1
    15