Hi
I am trying to create a PDF document using HRML2PDF.
I have copied all the files and folders from the downloaded packed html2pdf-4.5.0 to /var/www/html except the folders example and test.
I have downloaded the composer.phar too and run the cmd: sudo php composer.phar install
No errors occurred.
When I run my php-code I receive the following error message: Fatal error: Class 'HTML2PDF_locale' not found in /var/www/html/html2pdf.class.php on line nnn
The class is defined in the local.class in the _class folder.
What am I missing in the code?
<?php
include("inc/conf.php");
require('html2pdf.class.php');
.
.
.
$pdf = new HTML2PDF('P','mm','A4');
$pdf->SetLeftMargin(1.0);
$pdf->SetRightMargin(1.0);
$pdf->SetTopMargin($topMargin);
$pdf->SetAutoPageBreak(true,$bottomMargin);
.
.
.
echo "</tr>";
echo "</table>";
echo "</body>";
echo "</html>";
$htmlbuffer=ob_get_contents(); // henter indholdet af bufferen
ob_end_clean(); // Stopper og sletter bufferen
$pdf->AddPage(); // Laver den første side
$pdf->WriteHTML($htmlbuffer); // skriver html til pdf siden
$file=basename(tempnam(getcwd(),'tmp'));
rename($file,"./tmp/".$file.'.pdf');
$file.='.pdf';
$pdf->Output($file);
.
.
.
?>