Create PDF file using PHP
I have used TCPDF with great success to create PDFs programmatically using PHP.
And for creating text documents: http://www.phpdocx.com/ (this is a paid solution).
source to share
You can use for example: html2pdf . It is a heavy library but seems to have very advanced features.
dompdf is a light library but lacks unicode support.
If you have access to the server, it might be better to install the PECL PDF library . But I have never used, so I cannot tell if this is good
source to share
Received one more: FPDF
Hello World:
<?php
require('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
?>
Taken from: FPDF Tutorial 1
source to share
wkthmltopdf is really the only solution that worked for me, which could give what I call acceptable results. However, there were some minor changes to the CSS that had to be made, however, it worked very well when it came to providing content. All the other packages are really only suitable if you have a fairly simple document with one base table, etc. There is no way to get them to get fair results on complex documents with design elements, css, multiple overlapping images, etc. If complex documents are in the game - don't waste time (as I did) - go straight to wkhtmltopdf.
Take a look at my own question and solution in this post HTML2PDF to PHP - convert utilities and scripts - examples and demos
source to share