This is going to sound like an odd request, but… I have a web application that is set up to collect data and store it into a database on regular intervals. The application is designed to basically stay open all the time, and the screen displays what is most recently added into the database (by using ajax to check the database and refresh the page when there is something new). I also need to create a printout whenever something is added into the database as well. I currently have a print button, which forces the print dialogue box to come up and uses a different style sheet for a “print view” but the user is still required to press the print button, and then press print in the dialogue that comes up. Is there a way to fully automate the process to where the site will print the page to the default printer and bypass the print button and the dialogue screen that comes up?
Edit: I know I can do window.print(); to make the print dialog come up… I was asking if I can actually make a page come out of the printer with no human input. And based on the posts, it seems like it can’t be done with just the web browser.
You could write a separate application that has a web-browser control, and have it do the printing for you. There’s no way to do it in a regular browser, though — think of the implications of that.