1

I want to achieve print functionality such that user can print out the web form and use it as paper form for the same purpose. Of course I do not need all the web page header and footer to be printed, just content of a div which take most of the page. I did play around with media print css and menage print result to look almost as original page. But the I tried to print it in another browser(Chrome) and it is all messed. (before I tried Mozilla).

For the web form I user css framework Twitter Bootstrap and I had to override its css (in print media) for almost each element individually to get some normal look in the print result.

My question is is there some way (framework/plugin) to print just what you see on the page, maybe as an image or something?

Any other suggestions are welcome.

Thanks.

eomeroff
  • 9,599
  • 30
  • 97
  • 138

1 Answers1

1

If you are familiar with PHP you can try the PHP class files of TCPDF or those of FPDF.

Or there is also dompdf which renders HTML to PDF, but this will include more than just the information of one div.

And for further info here is a post on Stack where users are discussing which they think is best.

Community
  • 1
  • 1
Adam Brown
  • 2,812
  • 4
  • 28
  • 39