【发布时间】:2014-10-06 11:31:10
【问题描述】:
在我当前的软件中,我正在创建 pdf 文件并使用 ghostscript 将它们打印出来,如下所示:
...
string[] printParams = new string[] {
"-q",
"-sDEVICE=mswinpr2",
"-sPAPERSIZE=a4",
"-dNOPAUSE",
"-dNoCancel",
"-dBATCH",
"-dDuplex",
string.Format(@"-sOutputFile=""\\spool\{0}""", printerName),
string.Format(@"""{0}""", filename)
...
var p = new Process();
p.StartInfo.FileName = this.ghostScriptExePath;
p.StartInfo.Arguments = string.Join(" ", printParams);
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();
...
到目前为止,它工作得很好,可以在指定的打印机上打印出来。
我的问题是,在某些情况下,我想从特定纸盘中打印出我的 pdf 文档。
这可以用ghostscript实现吗?
我知道,我可以在已安装的设备上添加两次打印机,一次使用托盘 1,一次使用托盘 2,但是在所有受影响的客户端 PC 上进行配置需要付出很多努力。
感谢您的帮助!
卡尔
【问题讨论】:
标签: c# pdf printing ghostscript