Auto Print Trigger

Streamline the workflow. This script triggers the print dialog immediately upon page load, saving the user a click on dedicated document pages.

Click the button below to simulate opening a dedicated "Print Receipt" window:

Copy the Script

<script>
window.onload = function() {
    window.print();
}
</script>

<!-- Or shorter inline version -->
<body onload="window.print()">

Frequently Asked Questions

Yes. `window.print()` is a blocking call in most browsers. The user cannot interact with the page until they either print or cancel the dialog.

Yes. You can use the `onafterprint` event listener (supported in most modern browsers) to run `window.close()` once the dialog is dismissed.

It is extremely annoying on normal webpages. Only use this on dedicated popup windows designed specifically for printing (like a receipt).