简体   繁体   English

PHP:通过从数据库中获取数据来生成PDF

[英]PHP: Generating PDF by fetching data from database

I Have just started to learn PHP. 我刚刚开始学习PHP。 As a task, 作为一项任务,

I submitted a form which sent the values to the MySQL database, Now, I want to fetch these values from the database and display it in a letterhead format and then have to output that letterhead as a PDF file. 我提交了一个将值发送到MySQL数据库的表单,现在,我想从数据库中获取这些值并以信头格式显示,然后必须将该信头输出为PDF文件。

Please suggest me a way to do that from the basic level, I tried to follow 1-2 questions here but couldnt get any results. 请从基本的层面上为我提出一种解决方法,我在这里尝试遵循1-2个问题,但未获得任何结果。 I need a step-by-step procedure... 我需要逐步的程序...

Thanks in advance! 提前致谢!

Your work can't be done by us. 我们无法完成您的工作。 so please search and research again. 因此,请再次搜索和研究。 PHP itself provides a good way to generate pdf. PHP本身提供了生成pdf的好方法。 If you don't like it you can go for a library such as fpdf. 如果您不喜欢它,则可以使用fpdf之类的库。 You should google it first. 你应该先用谷歌搜索。 try some code. 尝试一些代码。 Then you will get most errors. 然后,您将获得最多的错误。 If you can't find a solution for that errors. 如果找不到该错误的解决方案。 You can post a question seeking help. 您可以发布问题寻求帮助。 We can help you. 我们能帮你。

Here is the link for Php pdf documentation Here is the link for fpdf php library website 这是Php pdf文档的链接这是fpdf php库网站的链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM