Log in

View Full Version : Convet Data to Php file



cristopher
07-18-2012, 09:34 AM
Hi,

I create web application of employee management system.

I generate different report in this system. data will fetched from database and display in web page.

but i also want to convert it in to .PDF file. so we can download report and print out with hard copy.

Any one can help how can i convert that data into PDF file.

thanks,
Crish

bernie1227
07-18-2012, 09:41 AM
This may help:
http://sourceforge.net/projects/html2fpdf/

cristopher
07-18-2012, 09:53 AM
Hi,

I can't understand above links code.

How can i use with my database.

I fetched data from mysql which i want to output in PDF file format with table structure.

Please give me proper code or example so i can use it with my system easily.


Thanks for reply.
crish

djr33
07-18-2012, 10:00 AM
Creating a PDF with PHP will not be easy. You'll need to learn to deal with a library like that, or you won't be able to do this. I've had similar projects and it's difficult and honestly often the libraries are buggy and which one you'll want to use will depend on exactly what features (or layout options) you'll need in the PDF and which library supports that.
The only alternative would be to hire someone to do this for you.

However, this certainly isn't impossible-- take some time to get to know the library and look at the demo files. You will find a lot of information with a basic search as well, although it all will be difficult in general.

cristopher
07-18-2012, 10:51 AM
Hi,

If convert it into PDF not possible. so not problem.

But i want just option in my system which provide print out hard copy with proper structure which i defined.

Have you any idea or example?

Please give me that or link.

Thanks,
Crish.

djr33
07-18-2012, 11:00 AM
You can do this with a PDF. But it won't be easy, as I said. You'll need to learn how to use a library like that. If that's not possible, you could hire someone.

Alternatively you could look into a print stylesheet (CSS) but that won't give you paper-layout control, just a different layout for printing than what is shown on screen.


Of course you could also create the PDFs manually (if that isn't too much work) and link them to the pages.

bernie1227
07-18-2012, 11:14 AM
If you want to print a lot of data, in different PDFs, is PDF really the most effective way to print the information?