0

Hi frns

Am asha ! just looking and searching for a while how to convert php output as pdf file. I mean the localhost output of php file will be save as pdf file. If anybody knows pl help me.

Thanks in advance

asha

Edited by Dani: Formatting fixed

8
Contributors
8
Replies
30
Views
5 Years
Discussion Span
Last Post by agent21
0

is there any specific function in fpdf or tcpdf to retrieve database tables because both fpdf and tcpdf have only text formatting functions and there is no database connectivity or retrieving dynamically

0

You need to write your own code for retriveing from mysql. LIke you do to format data to html. Same way you fetch data and use tcpdf funtions to format your pdf file.

tcpdf is advance and If you look at tcpdf examples, you will find almost all kind of examples. I am sure your case will fit into one of them.

1

I find this to be the easiest approach. You need to format your output (in html) the way you want to see it saved to PDF. You write that output to a variable and then echo it initially to see that the format is correct. Then you can send that variable to html2pdf to convert it. This doesn't require a lot of special code in your program. The conversion process works pretty well. The most important rule is that your html must have a closing tag for all of your html (opening) tags. You can get away with taking shortcuts in html but this program expects everything to be matched properly

Click Here

0

I haven't used html2pdf, but I can wholly recommend tcpdf. I have used quite a few php-based converters, but this is my favourite one so far. May have a look at html2pdf - thanks Chris.

0

Rar! Ïs 7 t 0 O d ­•njNeœC 3
you cam.txt ğ>_ PÔËäϱC |$ş8"á È QH¥_Ÿ˜sI¶šmä½WQÔr÷°ÿ|Ä£‘sSR lÛÃW¤´V|

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.