0

どういうわけか、Adobe Acrobat X では、PdfFilePrinter は、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;
4

1 に答える 1

2

解決済み:

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

Print(int milliseconds) オーバーロードは、adobe acrobat プログラムを強制終了します。

于 2011-06-24T08:26:49.713 に答える