Advertisement
cuatl

pdf2jpg

Aug 27th, 2014
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. #!/bin/sh
  2. # ps2jpg,v 1.0 2002/12/04 16:09:22
  3. # Convert PostScript file to Jpeg Image.  Usage:
  4. #       ps2jpg [infile.ps [outfile.txt]]
  5. # If outfile is omitted, output file will be named infile.ps.jpg
  6. #
  7. OPTIONS=" -q -dBATCH -dNOPAUSE "
  8. DEVICE=" -sDEVICE=jpeg "
  9.  
  10. if ( test $# -eq 0 ) then
  11.         echo Usage: ps2jpg [infile.ps [outfile.jpg]]
  12.         echo If outfile is omitted, output file will be named infile.ps.jpg
  13. elif ( test $# -eq 1 ) then
  14.   OUTPUT=" -sOutputFile=$1.jpg "
  15.         /opt/bin/gs $OPTIONS $DEVICE $OUTPUT "$1" -c quit
  16. else
  17.   OUTPUT=" -sOutputFile=$2 "
  18.         /opt/bin/gs $OPTIONS $DEVICE $OUTPUT "$1" -c quit
  19. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement