1
Answer

PDF Silent Printing not working in IIS using C# Process !!!

Dear all,
I am trying to do autoprinting option using ASP.Net webapplication with some SSIS packages.
 
In my requirement, i need to auto print the pdf file with below codes. It is working when i am debugging in Visual studio. But when i deploy the files in IIS, It is not auto printing. 
 
Please help me on this. Do i need to enable any properties in Windows server 2008.
 
Thanks in advance.
 
  1. string arguments = arugumentValue;  // /t "D:\\Temp_Report.pdf" "\\TestPrinter_one"  
  2.   
  3. string executable="C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe"  
  4.   
  5. int waitingTime = 18000;  
  6.   
  7.   
  8. ProcessStartInfo starter = new ProcessStartInfo(executable, arguments);  
  9.                 starter.CreateNoWindow = true;  
  10.                 starter.WindowStyle = ProcessWindowStyle.Hidden;  
  11.                 starter.UseShellExecute = false;  
  12.                 Process process = new Process();  
  13.                 process.StartInfo = starter;  
  14.   
  15.                 process.Start();  
  16.   
  17.                 process.WaitForExit(waitingTime); // hold the process for some seconds so that PDF   
  18.                                                                  //files can be sent   
  19.                 process.CloseMainWindow();  
  20.                 process.Kill();  
  21.                 starter = null;  
  22.                 process = null;   
 
 
Answers (1)