How to Print in JavaScript Without Displaying the Print Dialog Box

A common request we’ve heard is how to print from the web browser in JavaScript without first displaying the printer dialog box.  I’m going to show you how this is possible using KioskSimple kiosk software.

When it’s time for your kiosk to print a ticket, receipt, label, etc… the last thing you want is for the user to be prompted by the print dialog.

For security reasons your browser requires that you’re prompted by the print dialog box before printing, otherwise any webpage could start using your printer without your permission.  Just imagine how annoying it would be if you visited a website and your printer suddenly started spitting out a mountain of paper.

While this security restriction makes sense in your typical web browser, it doesn’t make sense in a self-service kiosk environment.  This is because on your kiosk you have total control over the content displayed to users and often have created the web pages yourself, so you know they can be trusted to use the printer appropriately.

This is why we made it easy to print without displaying the print dialog box from KioskSimple WITHOUT ANY MODIFICATION TO YOU WEBSITE.

JavaScript Direct Print

Continue reading “How to Print in JavaScript Without Displaying the Print Dialog Box”