I need some php or javascript script first to display a PDF file in a HTML modal (client browser) and then to print a PDF file from html modal (client browser) to a standard paper size thermal printer whose dimensions (left, margin, top, bottom margin will be hardcoded)
Output result is to print a receipt for restaurant order on a thermal printer or order receipt (PDF file) could also be sent to email. I already have a script that generates order as a PDF file and save it on a server and attaches to a email then sent. I just need php or javascript script to display PDF file as a preview in a html modal and then to let client print the order receipt to a thermal printer.
How can I achieve this?