我需要打印一个pdf文件,标准打印,其他pdf文件,其他标准打印等。 但是,当我发送到打印机的纸张混合。同步pdf打印和标准打印
我的愿望:
PDF
PrintPage
PDF
PrintPage
PDF
PrintPage
但是,我得到了(例如):
PDF
PDF
PrintPage
PrintPage
PrintPage
PDF
我用下面的代码才达到任务:
while(...) {
ProcessStartInfo starter = new ProcessStartInfo("path to acrobt32.exe", "/t mypdf001.pdf");
starter.CreateNoWindow = true;
starter.RedirectStandardOutput = true;
starter.UseShellExecute = false;
Process process = new Process();
process.StartInfo = starter;
process.Start();
PrintDocument pd = new PrintDocument();
pd.DocumentName = "Work";
pd.PrintPage += new PrintPageEventHandler(pd_PrintPageHandler);
pd.Print();
}
任何帮助将受到欢迎。谢谢。
它没有用,因为acrobat阅读器有时保持打开状态。 – Gabriel
您可以指定等待acrobat关闭的最大ms数,例如:'WaitForExit(5000)'最多等待5秒钟。 –