Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 使用pdfprint.exe命令行工具打印订单_.net_C# 4.0_Pdf_Printing - Fatal编程技术网

.net 使用pdfprint.exe命令行工具打印订单

.net 使用pdfprint.exe命令行工具打印订单,.net,c#-4.0,pdf,printing,.net,C# 4.0,Pdf,Printing,我正在.NET应用程序中使用pdfprint.exe()。我正在打印几个pdf文件,每个文件都有几个副本。代码如下所示,在循环中调用此方法: private bool PrintFile(string file, string printer, short copies) { try { this.log.Debug("Send command to verypdf..."); var info =

我正在.NET应用程序中使用pdfprint.exe()。我正在打印几个pdf文件,每个文件都有几个副本。代码如下所示,在循环中调用此方法:

    private bool PrintFile(string file, string printer, short copies)
    {
        try
        {
            this.log.Debug("Send command to verypdf...");

            var info = new ProcessStartInfo
            {
                FileName = this.veryPdfExe,
                Arguments = string.Format(@"-printer ""{0}"" -printermargins -mergeprintjobs -copies {1} ""{2}""", printer, copies, file),
                CreateNoWindow = true
            };

            this.log.Debug(info.Arguments);

            var process = new Process { StartInfo = info };
            process.Start();

            return true;
        }
        catch (Exception ex)
        {
            this.log.Error(ex);
            throw new LabelMakerException("Failed to print file: " + file);
        }
    }
我的问题是,文件的打印顺序与发送到打印机的顺序不同。有没有办法控制这一切。我没有找到任何命令行参数。有没有办法将打印机配置为同步的?非常感谢您提供的所有想法和建议。

开始后,请尝试致电

如果它不工作(verypdf在打印机开始打印之前自动关闭),请在启动进程后使用命令。尝试根据不同的情况(即拷贝数、首次使用打印机、文件大小)手动设置超时