0

I have a PHP web application which generates HTML pages meant to be printed through a single printer and from a specific tray.

Currently the users have to print these pages through the browser and go through printer settings to select the tray.

Is there any way that through PHP the pages could be printed as soon as they are generated, and from the desired tray? Automatically without the user having to do anything.

printer_open('\\xx.xx.x.xx\_printer_name_');

The above results in an error 'Call to undefined function printer_open()'

user350813
  • 29
  • 6
  • Possible duplicate of [Printing data to printer using PHP](https://stackoverflow.com/questions/22313439/printing-data-to-printer-using-php) – Russ J Mar 07 '19 at 22:02
  • @user350813, are you printing in the client through the browser or in the server (as in to a printer connected to the server)? It is not possible to manage the printer from the browser. Something I did to overcome this was creating a new protocol (print:// instead of http://) and made a small desktop program to open the url and print it directly, avoiding the browser altogether. – solarc Mar 07 '19 at 22:10

0 Answers0