Hello. I'm using PHP Smarty, and have generated HTML output. Now i'm trying to convert this into a PDF. (I've got a regular website up & running - just creating monthly reports in PDF).
I've found dompdf and set it up, & have all the files correct, However I'm getting an error:-
$sm="/home/users/MYPATYH/usr/dompdf/dompdf/vendor/dompdf/dompdf/lib";
ini_set('include_path',ini_get('include_path').":$sm");
Fatal error: Uncaught Error: Class 'DOMPDF' not found in
Question:- WHICH file exactly, should be included in the directory, What file is being accessed for "DOMPDF"?
can someone recommend a good PDF converter (I've got all the HTML output). with a step-by-step guide as to how to install it.
1) Download files
2) Upload files
3) find directory /usr/path/etc../ etc...
4) include "path to file" (this should be the path to file.php file... - (Exact filename its looking for)
My current code is:-
require ("/home/users/MYUSERPATH/usr/dompdf/dompdf/autoload.inc.php");
require ("/home/users/MYUSERPATH/usr/dompdf/dompdf/vendor/autoload.php");
$filename = "$file2/report-$dt.pdf";
$dompdf = new DOMPDF();
$dompdf->load_html($output);
$dompdf->set_paper('a4', 'portrait');
$dompdf->render();
file_put_contents($filename, $dompdf->output());
ERROR- Fatal error: Uncaught Error: Class 'DOMPDF' not found in ......