Home > Mobile >  PHP to local printer
PHP to local printer

Time:10-28

I'm creating a formatted list of data from a MySQL database table and 'echoing' it to screen perfectly well. How do I instead send the output to a local default printer, with or without a printer popup? There must be a simple answer to this but I can't find it anywhere. Any help much appreciated. Bob

I've looked all over and can't find anything other than saving it as a file with fopen() and fwrite(). And that of course needs the user to choose a path to save it in and a separate print procedure. I just want the php script to send the output to the printer.

CodePudding user response:

maybe use something like https://tcpdf.org/about/

It creates and display a PDF which almost all devices with a browser can print and even save.

  •  Tags:  
  • php
  • Related