I'd like to convert an html table into a pdf file using php. I don't want to
install or keep the library in the www folder.
I am using the mPDF library. Here you have some examples and documentation.It is really great. It works with Look an example:
require_once (dirname(__FILE__) . '/../pdf/mpdf.php'); /*this is the constructor with different options : mPDF([ string $mode [, mixed $format [, *float $default_font_size [, string $default_font [, float $margin_left , float $margin_right , *float $margin_top , float $margin_bottom , float $margin_header , float $margin_footer [, *string $orientation ]]]]]])*/ $mpdf = new mPDF('win-1252', 'A4', '', '', 10, '', '', '', '', ''); $mpdf -> useOnlyCoreFonts = true; $mpdf -> SetDisplayMode('fullpage'); $mpdf -> WriteHTML("here you put the html
"); $mpdf -> Output();// this generates the pdf exit;