How to Print PDF that is located in the Application Source Location in ASP.NET either by using client side coding or code behind coding
protected void PrintPDF(string path) { try { using (Process printjob = new Process()) { printjob.StartInfo.FileName = path; printjob.StartInfo.Verb = "Print"; printjob.StartInfo.CreateNoWindow = true; printjob.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; PrinterSettings setting = new PrinterSettings(); setting.DefaultPageSettings.Landscape = true; printjob.Start(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
MessageBox.Show
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)