admin管理员组

文章数量:1401171

Does anybody have experience with printing from a web page?

I have some preprinted papers. On those papers there are some checkboxes that have to be checked based on data that has been filled-in via a webform or called from a MySQL database.

All of this data is available from a PHP web application. Now I am searching for a solution to print this data on my preprinted documents.

So I have to print some crosses on these documents that are located at a specified position.

Does anybody have an idea and an example of how to handle this?

Does anybody have experience with printing from a web page?

I have some preprinted papers. On those papers there are some checkboxes that have to be checked based on data that has been filled-in via a webform or called from a MySQL database.

All of this data is available from a PHP web application. Now I am searching for a solution to print this data on my preprinted documents.

So I have to print some crosses on these documents that are located at a specified position.

Does anybody have an idea and an example of how to handle this?

Share Improve this question edited May 22, 2012 at 14:02 Nealbo 5174 silver badges20 bronze badges asked May 22, 2012 at 11:54 mariomario 1772 silver badges11 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 4

If you want to print all the contents of a webpage as same, you should use php fpdf library.I have developed a website where I needed to print all contents of a form as same.And fpdf was an effective solution. You can get all the supports, downloads and tutorial at http://www.fpdf

You should probably generate PDFs that the user can download and print.

The browsers render HTML pretty different when printed. You need fine control over the positioning on the page to fit the output to preprinted paper.

I have zero php experience, but a google search for php generate pdf looks promising. See also this SO search.

I've created similar system (automated printing all the way to printer after click on a web page) with PHP, FOP (http://xmlgraphics.apache/fop/) and CUPS (http://www.cups/).

I too suggest using PDF for formatting as the alignment seems to be critical in your needs.

If I did such a system now, I'd probably use fPDF (http://www.fpdf/) and then use either system call or some kind of job queue (Gearman etc) to print the file to network printer.

Well printing with pdf option is fine :)

本文标签: phpPrinting data from a web application on preprinted paperStack Overflow