Tag: 打印

如何使用GhostScript(gswin32c.exe)shell命令在默认网络打印机上打印PDF

我想通过GhostScript在Windows的网络打印机上打印PDF文件。 (我不想使用Adobe Reader) 我已经阅读了gswin32c.exe ,它可以完成这项工作。 我尝试了许多命令,并且没有找到如何强制gs在我的(Windows默认)网络驱动器上打印PDF的方法。 我不需要点精确网络打印机 – 默认可以使用。 但如果没有这样的选择,我也很高兴通过打印机名称。 (我尝试过使用param -SDevice =“\ server_IP \ printer_name”,但这也不起作用……) 在Windows cmd下运行的命令: gswin32c -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=1 -sDEVICE=ljet4 -sOutputFile=”\\spool\\\Server_Name\Printer_name” “C:\test.pdf” 基于上面创建的方法 – 没有工作和thorwsexception。 (错误代码= 1) /// /// Prints the PDF. /// /// The ghost script path. Eg “C:\Program Files\gs\gs8.71\bin\gswin32c.exe” /// The number of copies. /// Name of […]