Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.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
C# 即使CreateNoWindow为true,PdfilePrinter.Print仍会启动Adobe Acrobat reader_C#_Pdfsharp - Fatal编程技术网

C# 即使CreateNoWindow为true,PdfilePrinter.Print仍会启动Adobe Acrobat reader

C# 即使CreateNoWindow为true,PdfilePrinter.Print仍会启动Adobe Acrobat reader,c#,pdfsharp,C#,Pdfsharp,不知何故,使用Adobe Acrobat X,PdfilePrinter无法阻止Adobe以静默方式打印PDF页面 这是我的密码: PdfFilePrinter.AdobeReaderPath = PDFExecPath; var printer = new PdfFilePrinter(this.documentPath, this.printer); printer.Print(); 以下是PdfSharp的来源: ProcessStartInfo startInfo = new Proc

不知何故,使用Adobe Acrobat X,PdfilePrinter无法阻止Adobe以静默方式打印PDF页面

这是我的密码:

PdfFilePrinter.AdobeReaderPath = PDFExecPath;
var printer = new PdfFilePrinter(this.documentPath, this.printer);
printer.Print();
以下是PdfSharp的来源:

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = PdfFilePrinter.adobeReaderPath;
string args = String.Format("/t \"{0}\" \"{1}\"", this.pdfFileName, this.printerName);
//Debug.WriteLine(args);
startInfo.Arguments = args;
startInfo.CreateNoWindow = true;
startInfo.ErrorDialog = false;
startInfo.UseShellExecute = false;
if (this.workingDirectory != null && this.workingDirectory.Length != 0)
  startInfo.WorkingDirectory = this.workingDirectory;
已解决:

PdfFilePrinter.AdobeReaderPath = PDFExecPath;
var printer = new PdfFilePrinter(this.documentPath, this.printer);
printer.Print(1000);

打印(int毫秒)过载会杀死adobe acrobat程序。

这对我来说确实是一个错误。