How to change Ghostscript output file (in printer spooler)

后端 未结 4 814
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 08:45

I am using Ghostscript to print a PDF by command line arguments. But it shows the printed document\'s name as Ghostscript output in printer spooler. I want to change it to a

4条回答
  •  既然无缘
    2020-12-11 09:28

    Please refer to the documentation in http://www.ghostscript.com/doc/9.06/Devices.htm#Win

    In particular there is an example in section 10.2 with explanation of the parameters that can be specified in section 10.3. Just changing the document name can be done by:

    mark /UserSettings <> (mswinpr2) finddevice putdeviceprops setdevice
    

    This can be put into a file as in the example, or can be in a string on the command line following a -c option. If you use -c instead of putting the above PostScript in a setup file, put it in as the last option before -f and the input-filename.

    Note: You should not specify the -sDEVICE=mswinpr2 on the command line -- the setdevice takes care of this. I tested this on my laptop with the command line:

    gswin32c \
      -dNOPAUSE -dBATCH \
      -c "mark /UserSettings <> (mswinpr2) finddevice putdeviceprops setdevice" \
      -f examples/colorcir.ps
    

提交回复
热议问题