Closed rossip89 closed 8 years ago
You can't install this package unless you have full access to your server. If you are in shared hosting and your provider is a good partner to you, try to ask them to install the package of poppler-utils
on th server.
To determine where is the exact location of pdfinfo
and pdfhtml
on linux-based server, you can do this
which pdfinfo
which pdfhtml
You will get the location of each binaries if you have already installed poppler-utils
properly on your server.
thanks for answering, there will be a way to install it myself, the server provider almost not answer me and I need urgent
I tell you that I found the method to execute, simply use the following line
shell_exec("/usr/bin/pdftohtml mypdf.pdf $output_folder/mypdf 2>&1")
thanks for your help.
Hello @mgufrone , I have a problem uploading my project to the server. I comment to you. It worked perfectly on my local Windows machine using this code:
<?php
include
'vendor/autoload.php';
use
Gufy\PdfToHtml\Config;
Config::set('pdftohtml.bin', __DIR__.'/Poppler/bin/pdftohtml.exe');
Config::set('pdfinfo.bin', __DIR__.'/Poppler/bin/pdfinfo.exe');
$p = 'sample.pdf';
$pdf = new Gufy\PdfToHtml\Pdf($p);
$pdf->html();
?>
But unfortunately the PHP code will run on Linux server where exe files could not run on. So I found there is a usage note for OS/X and Debian/Ubuntu to use:Config::set('pdftohtml.bin', __DIR__.'/usr/local/bin/pdftohtml');
Config::set('pdfinfo.bin', __DIR__.'/usr/local/bin/pdfinfo');
Instead of:
Config::set('pdftohtml.bin', __DIR__.'/Poppler/bin/pdftohtml.exe');
Config::set('pdfinfo.bin', __DIR__.'/Poppler/bin/pdfinfo.exe');
I appreciate your help