somehow, with Adobe Acrobat X, PdfFilePrinter cannot prevent Adobe from silently printing PDF pages.
here’s my code:
PdfFilePrinter.AdobeReaderPath = PDFExecPath;
var printer = new PdfFilePrinter(this.documentPath, this.printer);
printer.Print();
here’s the PdfSharp’s source:
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;
solved:
The Print(int milliseconds) overload kills the adobe acrobat program.