Can the shell command be executed from php?
$rtn = exec ('CLI Command to execute', $emptyVartoCaptureOutput);
The command is executed in the shell, run under the context of the user running the php script (_WWW or similar for scripts run from apache webserver). All the output from the command is captured into an array when you supply the second optional argument.
Seems like this might solve your problem.
In response to your comment:
The tool you reference in your original post is the command line tool you would execute - you need to figure out the exact command to execute including any and all arguments for that command.
I am not familiar with the tool you reference, but I suspect that it has various options. A couple of important options to look at are where the generated html goes. I would guess it can go either to a file (that would require _WWW to have write permissions to a directory which is a huge security risk) or to std out. When you use the exec command from php, any output sent to std out is saved as an array, a new element for each new line, when you pass the exec function an optional second parameter. Thus you should be able to capture and manipulate and / or display the outputted html dynamically from your script.
For a simple html page that only displays the html from a pdf, you might do something like this:
<std header stuff omitted for brevity>
<?php
$rtn = exec('CLI Command to Execute -a option1 -b option2', $ouputted_html);
foreach ($ouputted_html as $val){
echo $val . "\n";
}
?>
</body>
</html>
You could use echo implode("\n", $outputted_html); in place of the foreach loop to accomplish the same, but the foreach loop allows you some control over each line if you choose to take advantage of it.
Note that the generated html may or may not contain header info, you will have to experiment and see. Obviously you can add what a standard html page needs or subtract if already provided.
So you now have the basis for displaying the pdf files as html, if you need specific help with the intricacies of the tool, I suggest you seek out a forum or listserv dedicated to that tool or perhaps request help from the developer(s) after reading the docs and FAQs.