开发者

How to Print mysql data on a A4 size paper using PHP-Codeigniter

开发者 https://www.devze.com 2023-04-01 23:44 出处:网络
I have four fields in my mysql table and in total there is around 85 rows of information. Now when any user clicks on a button, I want it to retrieve all the data from the mysql table开发者_如何学编程

I have four fields in my mysql table and in total there is around 85 rows of information. Now when any user clicks on a button, I want it to retrieve all the data from the mysql table开发者_如何学编程 and print those out on a A4 size paper.

For 85 rows of information it probably going to need more than one page, so in that case I also want it to display the page number out of total number of pages- like 2 out of 10. I have tried googling it but haven't found any good tutorial.

Would you please kindly help me how to do this ? Just for your information- I am using Codeigniter.

Thanks in Advance.


to my knowledge, there is not a way to instruct the web browser (html) how to print to specific device. you can play around with the media: print css commands, but that might not be easy. were it me, i'd use FPDF http://www.fpdf.org/ or something similar to create the results as a PDF - that way you can completely control the layout and paper size.

0

精彩评论

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