views:

142

answers:

2

I wrote a simple PHP application to create salary cheques for the company employees. The interaction between db & app is nice, the data is cached & the performance is high enough. So, what's the problem?

I need to provide the ability to print the whole cheques by just one click for the end-user. printing such a large HTML file is not possible dealing not with browser crashes.

So, I appreciate if you have any solution/suggestion for listing the cheques and printing 'em.

+2  A: 

Consider using a PDF library to generate a PDF document that could be downloaded and then printed by whomever was doing the printing?

One option is the PHP PDF object, some other options are also listed in the comments on that page.

Amber
thank you Dav. I'll work on it. is there any UTF support available using this to generate PDF?
Leszek Laszka
Considering the existance of functions like http://us3.php.net/manual/en/function.pdf-utf16-to-utf8.php I would assume the answer is yes, though I haven't used that particular functionality myself.
Amber
thanks Dav, I'll work on it.
Leszek Laszka
+3  A: 

Using FreePDF library, TCPDF and R&OS PDF Generating libraries, could be more simplistic alternatives to Dav's solution.
Unlike the FreePDF, TCPDF is supporting UTF-8 encoding.

Sepehr Lajevardi
thanks these are all easier to work with than the PDF Object thing!
Leszek Laszka
you're welcome ;)
Sepehr Lajevardi