I have just installed pdf2htmlEX without any issues. If I run the command on the server it works fine. So I know the library itself is doing what it is supposed to do. If I run the command in php via the exec function nothing happens. I assume exec is used in this instance??
In PHP
// doesn't work
$output = exec('pdf2htmlEX --zoom 1.3 pdf/test.pdf');
// doesn't work
$output = shell_exec('pdf2htmlEX --zoom 1.3 pdf/test.pdf');
If I run a general command in the exec function it works fine, so I know exec is enabled and working as expected.
// works fine
$exec = exec('pwd', $output);
print_r($output);
Direct on Command Line not in PHP
// works and generates the file as expected.
pdf2htmlEX --zoom 1.3 pdf/test.pdf
Any help would be greatly appreciated.
Command line reference for library https://github.com/coolwanglu/pdf2htmlEX/wiki/Quick-Start
EDIT:
After some further digging, it could be that the php script runs as a different user to the command line. My question would then be how do I check/fix this?