D
David Cho
I loop through the code that looks like this to batch a set of pdf
files.
Process command = new Process();
command.StartInfo.FileName = "AcroRd32.exe";
command.StartInfo.Arguments = "/p /h " + pdfFileName;
command.StartInfo.RedirectStandardOutput = true;
command.StartInfo.UseShellExecute = false;
command.Start();
The problem is, the order in which the documents are printed is very
important. But it seems like Acrobat Reader and the printer scramble
the order.
Here is a very strange thing. Right after command.Start(), I tried
command.StandardOutput.ReadToEnd();
It USED TO WORK. And then out of the blue, it prints the document and
just hangs until I kill Acrobat Reader.
Adding
Thread.Sleep(10000);
Will make the order right, but only to a degree. The order is just less
scrambled, which is not good enough.
So please help.
files.
Process command = new Process();
command.StartInfo.FileName = "AcroRd32.exe";
command.StartInfo.Arguments = "/p /h " + pdfFileName;
command.StartInfo.RedirectStandardOutput = true;
command.StartInfo.UseShellExecute = false;
command.Start();
The problem is, the order in which the documents are printed is very
important. But it seems like Acrobat Reader and the printer scramble
the order.
Here is a very strange thing. Right after command.Start(), I tried
command.StandardOutput.ReadToEnd();
It USED TO WORK. And then out of the blue, it prints the document and
just hangs until I kill Acrobat Reader.
Adding
Thread.Sleep(10000);
Will make the order right, but only to a degree. The order is just less
scrambled, which is not good enough.
So please help.