【发布时间】:2015-10-20 14:43:04
【问题描述】:
我想从 Excel 打印到 Postscript,然后打印到打印机。如何在将打印作业发送到打印机之前指定双面打印和装订。
我一直在看PrintTicket class。看起来很有希望。但我正在使用带有 .net 3.5 的 WinForms 项目。
如果没有必要,我真的不想设置多个打印队列。那么如何控制双面和装订选项呢?
Public Shared Function PrintSheetsToPS(ByVal wb As Excel.Workbook, _
ByVal arr As Array, _
ByVal PSFileName As String) As String
Dim svInputPS As String = TempPath & PSFileName
IO.File.Delete (svInputPS)
wb.Worksheets(arr).PrintOut(PrintToFile:=True, _
PrToFileName:=svInputPS, _
ActivePrinter:=PSPrinterName)
Return svInputPS
End Function
【问题讨论】: