You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
669 B

1 month ago
  1. #!/bin/sh
  2. # "Distill" PostScript with the Ghostscript 'ps2write' device
  3. # this generates a PDF-style stream with an attached
  4. # PostScript program to interpret it.
  5. # This definition is changed on install to match the
  6. # executable name set in the makefile
  7. GS_EXECUTABLE=gs
  8. OPTIONS="-P- -dSAFER"
  9. while true
  10. do
  11. case "$1" in
  12. -?*) OPTIONS="$OPTIONS $1" ;;
  13. *) break ;;
  14. esac
  15. shift
  16. done
  17. if [ $# -ne 2 ]; then
  18. echo "Usage: `basename \"$0\"` [options] input.ps output.ps" 1>&2
  19. echo " e.g. `basename \"$0\"` -sPAPERSIZE=a4 input.ps output.ps" 1>&2
  20. exit 1
  21. fi
  22. exec $GS_EXECUTABLE -q -sDEVICE=ps2write -sstdout=%stderr "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"