如何在fpdf中创建表(使用PHP)? [英] How do I create a table in fpdf (using PHP)?

查看:137
本文介绍了如何在fpdf中创建表(使用PHP)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我真的不知道从哪里开始......



我想创建一个包含可编辑数据的表格(我有这些数据和它的输入机制)采用pdf格式,便于打印,而不是创建html文档并将其转换为pdf格式(由于其自由流动的性质,如果输入的数据太长,某些图像会被推送到另一页,这是打印的问题)。



看到fpdf没有表支持,我是否需要使用行创建模板然后填写详细信息?如果是这样的话?



感谢您阅读本文!



Jordan



编辑:出于某种原因,每当我画一条线时,它都需要一行文字(我使用$ msg),否则它就不显示了。帮助?

Well, I don't really know where to start...

I want to create a table with editable data (I have this data and it's input mechanism) in a pdf format for easier printing rather than creating an html document and converting it to a pdf format (due to its free flowing nature, if data inputted is too long, certain images are pushed to another page which is a problem for printing).

Seeing as fpdf does not have table support, do I need to just create a template using lines and then fill in the details? If so how?

Thanks for reading this!

Jordan

for some reason whenever I draw a line, it requires a line of text (I'm using $msg) before it otherwise it does not show up. Help?

推荐答案

msg)之前它没有显示出来。帮助?
msg) before it otherwise it does not show up. Help?


OP评论说他解决了这个问题。在此处发布只是为了将其从未答复列表中弹出。
OP commented that he solved the issue. Posting here just to pop it out of Unanswered list.


使用FPDF为pdf文档制作表是一个常见问题。看一下easyTable项目: GitHub - fpdf-easytable / fpdf-easytable:fpdf-easyTable是一个PHP类,可以实现它易于为使用FPDF库生成的PDF文档构建表格 [ ^ ]



它非常易于使用:

Making tables using FPDF for a pdf document is a common problem. Have a look at the easyTable project: GitHub - fpdf-easytable/fpdf-easytable: fpdf-easyTable is a PHP class that makes it easy to build tables for PDF documents generated with the FPDF library[^]

It is very easy to use:

这篇关于如何在fpdf中创建表(使用PHP)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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