【问题标题】:print pdf with copies打印带有副本的pdf
【发布时间】:2021-04-12 13:46:43
【问题描述】:

我们用 c# 打印 pdf 文件。工作正常,但有没有机会设置份数 某处?我不想要循环。

ProcessStartInfo infoPrintPdf = new ProcessStartInfo();
infoPrintPdf.FileName = filename;
// The printer name is hardcoded here, but normally I get this from a combobox with all printers
string printerName = druckerS;
string driverName = "printqueue.inf";
string portName = "192.168.0.119";
infoPrintPdf.FileName = @"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe";
infoPrintPdf.Arguments = string.Format("/t {0} \"{1}\" \"{2}\" \"{3}\"",
    filename, printerName, driverName, portName);
infoPrintPdf.CreateNoWindow = true;
infoPrintPdf.UseShellExecute = false;
infoPrintPdf.WindowStyle = ProcessWindowStyle.Maximized;
Process printPdf = new Process();
printPdf.StartInfo = infoPrintPdf;
printPdf.Start();

System.Threading.Thread.Sleep(10000);

if (!printPdf.CloseMainWindow())              // CloseMainWindow never seems to succeed
    printPdf.Kill(); printPdf.WaitForExit();  // Kill AcroRd32.exe

printPdf.Close();  // Close the process and release resources

【问题讨论】:

标签: c# pdf printing


【解决方案1】:

大多数命令行 PDF 打印机(Acrobat、Foxit 等)仅支持 1 个副本,除非您使用循环。经过大量搜索,我发现最好的免费(非商业用途)是 Bullzip 的 PDF Studio:

"pathto\PdfStudio.exe" "MyPDF.pdf" /copies 3 /printer "My Printer" 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-23
    • 2018-12-17
    • 2019-09-10
    • 1970-01-01
    • 2017-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多