Printing multiple PDFs with PHP and updating database
Basically I just want to know if this is possible and a push in the right direction.
An admin area will have a li开发者_运维技巧st of orders that need printing. I’ll need to write each order as a pdf and print – can I do these all one after the other automatically? And secondly can I update the database record each time to say it has been printed, automatically?
Any help would be much appreciated, haven't dealt with printing to PDF before, I've looked at dompdf but happy to use any recommendations.
This is possable - you would need a task (typically a cron job) to check the "queue" of jobs in the DB and then run a php loop to print each task to a pdf
you should review http://php.net/manual/en/book.pdf.php
after the job completes you could update your database
精彩评论