I am building an order system for a client and would like to give them the ability to print all invoices but i have no idea how to do it
the invoices will be stored in a mysql db and I would like display each invoice in a fresh page EG invoice.php?ID=234
but is it possible to print an array of pages?
I’m really stuck with this one so any ideas would be much appreciated.
Thanks for reading.
Im talking about printing to paper, through an actual printer.
There’s a couple of ways you could do this:
1) Print a summary. Ok, maybe it’s just me, but I HATE paper. I’d rather just have a table output of the important information and sent to the printer via Javascript.
2) Build a summary page in a loop, adding a CSS page break and then javascript-ing to the printer
3) Build a multi-page PDF.
My method for forcing user to printer: Open page in new window via
action=_blank, then including this:<body onload="self.print()">Here’s a method to handle pagination on printers: How to deal with page breaks when printing a large HTML table