Exadra37 - 2012-08-17

Hello,

I have asked to my hosting provider to install pdftohtml in my account, but i can get the expected results.

Using the demo1.pdf file from http://pdftohtml.sourceforge.net, it gives a different result.

You can test at my running script in http://asualojaonline.com/PDF/PDF2ALL/pdf2all.php .

pdftohtml need some special configuration?

pdf2html have any list of commands tha can be used?

This is my script:

<?php
ini_set(\\\'default_charset\\\', \\\'utf-8\\\');
class Meshko
{
    function pdf2html($file)
    {
        $outpath = preg_replace(\\\"/\\\\.pdf$/\\\", \\\"\\\", $file).\\\".html\\\";
        system(\\\"pdftohtml \\\".escapeshellcmd($file), $ret);
        if ($ret == 0)
        {
            $value = file_get_contents($outpath);
            return $value;
        }
        
        if ($ret == 127)
            print \\\"Could not find pdftohtml tool.\\\";
        if ($ret == 1)
            print \\\"Could not find pdf file.\\\";
    }
}
?>

Thanks