After doing some research, I stumbled upon a helpful video. It suggests adding "--kiosk --kiosk-printing" switches to the chrome driver start in order to automatically bypass the print preview prompt, just like demonstrated in the video. I personally tested this method on the latest version of SRWare iron (chromium fork) and it worked flawlessly.
If you're using C# to develop your program, there's an easier solution available:
private void Button1_Click(object sender, EventArgs e)
{
PrintHelpPage();
}
private void PrintHelpPage()
{
// Create a WebBrowser instance.
WebBrowser webBrowserForPrinting = new WebBrowser();
// Add an event handler that prints the document after it loads.
webBrowserForPrinting.DocumentCompleted +=
new WebBrowserDocumentCompletedEventHandler(PrintDocument);
// Set the Url property to load the document.
webBrowserForPrinting.Url = new Uri(@"http://www.google.com"); //This is what you want to change
}
private void PrintDocument(object sender,
WebBrowserDocumentCompletedEventArgs e)
{
// Print the document now that it is fully loaded.
((WebBrowser)sender).Print();
// Dispose the WebBrowser now that the task is complete.
((WebBrowser)sender).Dispose();
}
The answer can be found Here, showcasing the use of the WebBrowser control to navigate to a specific URL, whether local or from the internet, and then print it using your default printer.