How to develop a report in PHP and send to Printer

how to develop a PDF report in PHP and send to Printer

What I have tried is this:
I used TCPDF (https://tcpdf.org/) to generate the reports and then print from the browser. As simple as that.
TCPDF library can be used to generate the reports in PDF format too if you desire to do so.