"Fossies" - the Fresh Open Source Software Archive

Member "gs8.54/lib/pdf2ps.cmd" (29 Dec 2005, 812 Bytes) of package /linux/misc/old/ghost/AFPL/gs854/gs854w32.exe:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) MS DOS Batch source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /* $Id: pdf2ps.cmd 6300 2005-12-28 19:56:24Z giles $ */
    2 /*
    3  * This file is maintained by a user: if you have any questions about it,
    4  * please contact Mark Hale (mark.hale@physics.org).
    5  */
    6 
    7 /* Convert PDF to PostScript. */
    8 
    9 parse arg params
   10 
   11 gs='@gsos2'
   12 inext='.pdf'
   13 outext='.ps'
   14 
   15 if params='' then call usage
   16 
   17 options='-dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite'
   18 
   19 /* extract options from command line */
   20 i=1
   21 param=word(params,i)
   22 do while substr(param,1,1)='-'
   23     options=options param
   24     i=i+1
   25     param=word(params,i)
   26 end
   27 
   28 infile=param
   29 if infile='' then call usage
   30 outfile=word(params,i+1)
   31 if outfile='' then do
   32     outfile=infile''outext
   33     infile=infile''inext
   34 end
   35 
   36 gs '-q -sOutputFile='outfile options infile
   37 exit
   38 
   39 usage:
   40 say 'Usage: pdf2ps [-dASCII85DecodePages=false] [-dLanguageLevel=n] input[.pdf output.ps]'
   41 exit