hello,
im using service that watch for pdf file and print it.
my code:
Process proc= new Process();
proc.StartInfo.WindowStyle=ProcessWindowStyle.Hidden;
proc.StartInfo.Verb ="print";
proc.StartInfo.FileName=".../Acrobat32.exe";
mailto
roc.StartInfo.Arguments=@"/p proc.StartInfo.Arguments=@"/p /t"+Filepath+" " + PrinterPath;
proc.StartInfo.UseShellExecute=false;
proc.StartInfo.CreateNoWindow=true;
proc.start();
proc.StartInfo.WindowStyle=ProcessWindowStyle.Hidden;
if(proc.HasExited==false)
{
proc.WaitForExit(30000);
}
proc.EnableRaisingEvents=true;
proc.CloseMainWindow();
proc.Close();
this code work but got some problems with consistence.
is there any idea how to improve this code.
Thanks
View the full article
im using service that watch for pdf file and print it.
my code:
Process proc= new Process();
proc.StartInfo.WindowStyle=ProcessWindowStyle.Hidden;
proc.StartInfo.Verb ="print";
proc.StartInfo.FileName=".../Acrobat32.exe";
mailto

proc.StartInfo.UseShellExecute=false;
proc.StartInfo.CreateNoWindow=true;
proc.start();
proc.StartInfo.WindowStyle=ProcessWindowStyle.Hidden;
if(proc.HasExited==false)
{
proc.WaitForExit(30000);
}
proc.EnableRaisingEvents=true;
proc.CloseMainWindow();
proc.Close();
this code work but got some problems with consistence.
is there any idea how to improve this code.
Thanks
View the full article