Reputation: 11
I am generating class schedule out of SQL queries concerning more than one tables from database. The schedule is displayed in an HTML table on the web page, along with it there are also some one line details about schedule besides the table. I want the user to be able to print this information/ save it in PDF format. So how would I be able to do that?
I think that the PHP or html code would not be necessary for answering this.
Upvotes: 1
Views: 6936
Reputation: 50
use TCPDF
include("tcpdf.php");
$html = "html code";
$pdf = new TCPDF();
$pdf->AddPage();
$pdf->writeHTML($html)
Upvotes: 2
Reputation: 5795
I choose DOMPDF to convert html to pdf. It's quite good, free and easy to use.
Upvotes: 0
Reputation: 597
I use PrinceXML if I need to be able to convert something to PDF. It's not free, but it is very easy to use.
Upvotes: 0