使用数据库中的内容创建PDF文件 [英] Create PDF file with contents from the database

查看:100
本文介绍了使用数据库中的内容创建PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用pdf打印票证.我已经能够检索票证详细信息,例如客户名称,订单ID,订单项目和总账单.我想将此详细信息放在.pdf文件中以备打印.我正在使用html和php标签从数据库中检索这些票证详细信息.如何将.php文件中回显的所有项目转换为.pdf?

I would want to print tickets in pdf. I was already able to retrieve the ticket details like customer name, order id, order items, and total bill. I would want to put this details in the .pdf file ready for printing. I'm using html and php tags in retrieving these ticket details from the database. How can I convert to .pdf all items echoed in .php file?

推荐答案

我个人更喜欢 TCPDF 来创建PDF从PHP.它仍在积极地开发中,并且具有许多其他库中尚未发现的功能(至今).只需查看他们的示例页面即可了解它的易用性.

I personally prefer TCPDF to create PDFs from PHP. It's still actively being developed and has a lot of features you don't find in other libs (yet). Just look at their examples page to see how easy it is to use.

这篇关于使用数据库中的内容创建PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆