I need to print from a PHP program directly to a printer on the user's computer (if there is one). I've used JS page print, but this is somewhat clumsy.

PHP runs on the server, it cannot print on the user's PC.

Generate PDF with PHP then print it

Hi,

Using javascript, we can able to print the document.Use this script in a button field

<button onclick="window.print()">Print this document</button>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.