I have a pdf file saved on development web server. I need to print the pdf stored on webserver without user interaction. below is the code I have, this works fine on localhost, But when trying to print from server where application is hosted (IIS), print does not work. Also I dont get any error. Please help if I am doing something wrong.

 ProcessStartInfo info = new ProcessStartInfo();
                    info.Verb = "PrintTo";
                    info.FileName = Server.MapPath("/Survey.pdf");                   
                    info.CreateNoWindow = true;
                    info.WindowStyle = ProcessWindowStyle.Hidden;
                    info.UseShellExecute = true;
                      info.Arguments = "\\\\servername\\printname";

Related posts

Recent Viewed