Convert HTML Files With Total HTML ConverterX and PHP

Please, download and install Total HTML ConverterX. Using the sample code below you will be able to convert XLS to PDF, DOC, TXT, etc.

 

  Example PHP:

$src="C:\\test\\test.html";
$dest="C:\\test\\test.pdf";
if (file_exists($dest)) unlink($dest);
$c= new COM("HTMLConverter.HTMLConverterX");
$c->convert($src,$dest, "-c pdf -log c:\\test\\HTML.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;

If you need examples on other languages please contact us. We will create any example specially for you.

Note that ActiveX is 32-bit only. If you are trying to use activeX under 64-bit internet information server (IIS) activeX will not work. Use command line version instead (it works with both 32- and 64-bit servers).

Related topics