星火微课系统客户端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ps2pdfxx.bat 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @echo off
  2. @rem $Id: ps2pdfxx.bat 8547 2008-02-25 16:10:43Z alexcher $
  3. rem Internal batch file for calling pdfwrite driver.
  4. rem The files that call this one (ps2pdf*.bat) write the command-line
  5. rem options into _.at, and then pass the last 2 (or fewer) arguments
  6. rem to this file.
  7. call gssetgs.bat
  8. echo -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE#pdfwrite >_.at2
  9. if "%OS%"=="Windows_NT" goto nt
  10. rem Run ps2pdf on any Microsoft OS.
  11. if %1/==/ goto usage
  12. if %2/==/ goto usage
  13. rem Watcom C deletes = signs, so use # instead.
  14. rem We have to include the options twice because -I only takes effect if it
  15. rem appears before other options.
  16. :run
  17. echo -sOutputFile#%2 >>_.at2
  18. copy /b /y _.at2+_.at >NUL
  19. echo -c .setpdfwrite -f%1 >>_.at2
  20. %GSC% @_.at @_.at2
  21. goto end
  22. :usage
  23. echo Usage: ps2pdf [options...] input.[e]ps output.pdf
  24. goto end
  25. rem Run ps2pdf on Windows NT.
  26. :nt
  27. if not CMDEXTVERSION 1 goto run
  28. if %1/==/ goto ntusage
  29. if %2/==/ goto nooutfile
  30. goto run
  31. :ntusage
  32. echo Usage: ps2pdf input.ps [output.pdf]
  33. echo or: ps2pdf [options...] input.[e]ps output.pdf
  34. goto end
  35. :nooutfile
  36. rem We don't know why the circumlocution with _1 is needed....
  37. set _1=%1
  38. set _outf=%_1:.PS=.pdf%
  39. if %_1%==%_outf% goto addsuff
  40. call ps2pdfxx %1 %_outf%
  41. goto postsuff
  42. :addsuff
  43. call ps2pdfxx %1 %1%.pdf
  44. :postsuff
  45. set _1=
  46. set _outf=
  47. :end
  48. rem Clean up.
  49. if exist _.at erase _.at
  50. if exist _.at2 erase _.at2