开发者

Printing multiple PDFs with PHP and updating database

开发者 https://www.devze.com 2023-03-06 15:45 出处:网络
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 pd

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

0

精彩评论

暂无评论...
验证码 换一张
取 消