create a project of type "Windows Forms"
And you added the tool "WebBrowser"
And I want to save the open web site inside the tool "WebBrowser" Via a printer "Microsoft Print to PDF"
Provided that the process is silent
And the code displayed is actually saving silently
But how do I give it a command to print the displayed website with a tool "WebBrowser"
string file = (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds.ToString();
string directory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
PrintDocument doc = new PrintDocument()
PrinterSettings = new PrinterSettings()
PrinterName = "Microsoft Print to PDF",
PrintToFile = true,
PrintFileName = Path.Combine(directory, file + ".pdf"),
What I have tried:
How to Print Silent in WebBrowser