Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create PDF file using PHP

I need to create a PDF or Word file filled with contents from my database. Then the customer need to download that file. All this should happend when customer click on link.

Anyone have any idea?

like image 298
Marko Vasic Avatar asked Mar 30 '12 07:03

Marko Vasic


People also ask

How can create HTML PDF in PHP?

Just clone the GitHub repository or you can also download directly from GitHub. Then you can import this library on your PHP file and use the library function. This library allows you modification while converting HTML pages into PDF.

Which is better TCPDF or FPDF?

TCPDF is based on FPDF and adds a few more methods, as you observed. I just checked my code and the methods I'm using in TCPDF that aren't available in FDPF are SetCellPadding , SetAlpha , WriteHTML and WriteHTMLCell .


1 Answers

I have used TCPDF with much success to generate PDF files programatically using PHP.

And to generate word documents: http://www.phpdocx.com/ (this is a paid solution).

like image 108
F21 Avatar answered Oct 18 '22 22:10

F21