Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

pdf2html fail to convert original demo1.pdf

Exadra37
2012-08-17
2013-04-24
  • Exadra37
    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