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.

Recommended Answers

All 3 Replies

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.