星火微课系统客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. # $Id: pdf2ps 8107 2007-07-05 19:04:29Z till $
  3. # Convert PDF to PostScript.
  4. # This definition is changed on install to match the
  5. # executable name set in the makefile
  6. GS_EXECUTABLE=gs
  7. gs="`dirname $0`/$GS_EXECUTABLE"
  8. if test ! -x "$gs"; then
  9. gs="$GS_EXECUTABLE"
  10. fi
  11. GS_EXECUTABLE="$gs"
  12. OPTIONS=""
  13. while true
  14. do
  15. case "$1" in
  16. -?*) OPTIONS="$OPTIONS $1" ;;
  17. *) break ;;
  18. esac
  19. shift
  20. done
  21. if [ $# -eq 2 ]
  22. then
  23. outfile=$2
  24. elif [ $# -eq 1 ]
  25. then
  26. outfile=`basename "$1" \.pdf`.ps
  27. else
  28. echo "Usage: `basename $0` [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3] input.pdf [output.ps]" 1>&2
  29. exit 1
  30. fi
  31. # Doing an initial 'save' helps keep fonts from being flushed between pages.
  32. # We have to include the options twice because -I only takes effect if it
  33. # appears before other options.
  34. exec "$GS_EXECUTABLE" $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"