jeudi 3 septembre 2015

Convert DOC to PDF using unoconv via Symphony Component

I'm trying to convert word documents to PDF, via the commandline using unoconv via PHP.

I'm using the Symphony Process Component to run the command via the command line.

public function run()
{
 $cmd = 'unoconv --listener & unoconv ' . $this->path;

 //Tested this to check for permissions and this worked.
 //$cmd = 'touch /vagrant/public/testfile.pdf'; 

 $process = new Process($cmd);

 $process->run();

 return $process->getOutput();
}

This yields no output, and doesn't convert the file. However if I echo the $cmd and paste it into the CLI it converts the file as expected and logs output as it goes.

Any ideas what could be the problem?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JPg2oi
via IFTTT

Aucun commentaire:

Enregistrer un commentaire