Is there a way to automatically print a web page using JavaScript?
Specifically, I want the printing process to be initiated with one click, without having to go through a print preview. The page in question contains both text and images, and I require a link that, when clicked, will trigger the printing of the current page.
As it stands, using window.print()
brings up the print preview page, requiring an additional step of selecting the print option from the browser. What I need is for the printing process to start immediately upon clicking the link or during the page's initial loading.