Loading src/Document.php +32 −2 Original line number Diff line number Diff line Loading @@ -71,13 +71,18 @@ class Document /** * @var string */ private $convCommand = 'unoconv -f pdf -o :outputFile :inputFile'; private $convCommand = 'unoconv --server=:host -f pdf -o :outputFile :inputFile'; /** * @var string */ private $tmpDir; /** * @var string */ private $host = '127.0.0.1'; /** * @var array */ Loading Loading @@ -654,7 +659,8 @@ class Document { $command = $this->getConvCommand(); $command = str_replace(':inputFile', $origine, $this->getConvCommand()); $command = str_replace(':host', $this->getHost(), $this->getConvCommand()); $command = str_replace(':inputFile', $origine, $command); $command = str_replace(':outputFile', $destination, $command); exec($command, $output, $return); Loading Loading @@ -726,6 +732,30 @@ class Document /** * @return string */ public function getHost(): string { return $this->host; } /** * @param string $host * * @return Document */ public function setHost(string $host) { $this->host = $host; return $this; } /** * @param null $prefix * Loading Loading
src/Document.php +32 −2 Original line number Diff line number Diff line Loading @@ -71,13 +71,18 @@ class Document /** * @var string */ private $convCommand = 'unoconv -f pdf -o :outputFile :inputFile'; private $convCommand = 'unoconv --server=:host -f pdf -o :outputFile :inputFile'; /** * @var string */ private $tmpDir; /** * @var string */ private $host = '127.0.0.1'; /** * @var array */ Loading Loading @@ -654,7 +659,8 @@ class Document { $command = $this->getConvCommand(); $command = str_replace(':inputFile', $origine, $this->getConvCommand()); $command = str_replace(':host', $this->getHost(), $this->getConvCommand()); $command = str_replace(':inputFile', $origine, $command); $command = str_replace(':outputFile', $destination, $command); exec($command, $output, $return); Loading Loading @@ -726,6 +732,30 @@ class Document /** * @return string */ public function getHost(): string { return $this->host; } /** * @param string $host * * @return Document */ public function setHost(string $host) { $this->host = $host; return $this; } /** * @param null $prefix * Loading