Hi Im looking for a way to add a print option to php script which generate a report. any idea for a way to do this? Thanks
hm I would help you but you should explain a bit more what you need... which kind of report and from where the data come?
You should export to PDF file then open it and using javascript to open Print Dialog. Print directly from browser is not a good idea (quality, url, header, background remove,...)
use javascript for this, generate your report onto a separate page <a href="javascript:window.print();">print</a> or you can export first your report (docx, csv, xls, pdf, etc...) use php header() for that
Except chrome, all browser will include it's url+title to printed page. This will make your print look ugly. Almost site which I see, use PDF for printing.