【发布时间】:2020-08-03 08:35:23
【问题描述】:
我正在使用 Ghostscript.NET 包装器打印 PDF 文件。打印工作正常,但实际打印前出现 2 个空白页。请问有人可以帮我吗?我对以下代码做错了吗?顺便说一下,我们的打印机很小,是用来打印条形码的。
Dim processor As Ghostscript.NET.Processor.GhostscriptProcessor = New Ghostscript.NET.Processor.GhostscriptProcessor()
Dim switches As List(Of String) = New List(Of String)
switches.Add("-empty")
switches.Add("-dPrinted")
switches.Add("-dBATCH")
switches.Add("-dNOPAUSE")
switches.Add("-dNOSAFER")
switches.Add("-dDEVICEHIGHTPOINTS=85")
switches.Add("-dDEVICEWIDTHPOINTS=90")
switches.Add("-dFIXEDMEDIA")
switches.Add("-dPDFFitPage")
switches.Add("-sDEVICE=mswinpr2")
switches.Add(Convert.ToString("-sOutputFile=%printer%") + _printerName)
switches.Add("-c")
switches.Add(_pdfFile)
processor.StartProcessing(switches.ToArray(), Nothing)
【问题讨论】:
-
缺少一个
E:应该是-dDEVICEHEIGHTPOINTS。
标签: vb.net printing ghostscript ghostscript.net