I am writing a .pdf file to a folder then attempting to silent print using acroRd32.exe. When I run the program I get the error
"Not a valid win32 application"
The program is creating the pdf file correctly.
Thanks
string pathToExecutable = @"c:\Program Files\Adobe\Reader 9.0\AcroRd32.exe";
RunExecutable(pathToExecutable, @"/t ""C:\WR014v2_.pdf"" ""//ussnadprt/USNPA039""");
private static void RunExecutable(string executable, string arguments)
{
ProcessStartInfo starter = new ProcessStartInfo(executable, arguments);
starter.CreateNoWindow = true;
starter.RedirectStandardOutput = true;
starter.UseShellExecute = false;
Process process = new Process();
process.StartInfo = starter;
process.Start();
StringBuilder buffer = new StringBuilder();
using (StreamReader reader = process.StandardOutput)
{
string line = reader.ReadLine();
while (line != null)
{
buffer.Append(line);
buffer.Append(Environment.NewLine);
line = reader.ReadLine();
View Complete Post