using (FileStream fs = new FileStream(@"C:\Example.Pdf", FileMode.Create, FileAccess.Write, FileShare.None)) { //this line create pdf. Print(); } //This print method does not work. private static void Print() { Process process = new Process(); process.StartInfo.FileName = "C:\\Example.Pdf"; process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; process.StartInfo.Arguments = string.Format("C:\\Example.Pdf"); process.Start(); process.WaitForExit(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)