We need to print thousands of invoices that are in this format –
where n = thousands of orders
Going through each order and then clicking on “print” is taking us a loooong time. Is there a way to create a multipage pdf from each of those URLs that we can download as one pdf so we can hit “print” once?
You could try a ruby script using the PDFkit gem (wraps wkhtmltopdf).
I would suggest splitting your pdf’s into probably 50 to 100 pages each, don’t like the thought of a 1000 page pdf in memory… probably fall over.
Example script, concats pages into one big html string with page break divs and saves to file: