I've downloaded and installed HTML2PDF on my webserver. I've made sure all the paths, that I can think of, are correct. Here's my simple script just to see the application is working. It should take my index.php file and convert it to a PDF that is output to the browser.
Assume / is CWD
<?
// Load the FPDF Library
require("./fpdf.php");
require("./html2pdf/html2pdf.class.php");
// Generate the PDF
$pdf=new HTML2PDF();
$pdf->AddPage();
$fp = fopen("index.php","r");
$strContent = fread($fp, filesize("index.php"));
fclose($fp);
$pdf->WriteHTML($strContent);
$pdf->Output();
?>
But when I view the page in the browser, I get this error:
Fatal error: Call to undefined method HTML2PDF::AddPage() in /var/www/mods/esr/pdftable.php on line 7
All subdirectories in /html2pdf have the correct r-w-x permissions. Host is Ubuntu Server running Apache 2.2.14 and PHP 5.
Thanks in advance.