diff --git a/src/Camelot.php b/src/Camelot.php index 0e9f24e..7884899 100644 --- a/src/Camelot.php +++ b/src/Camelot.php @@ -180,7 +180,7 @@ protected function getFilesContents($filePath) protected function runCommand($outputPath = null) { - $output = $outputPath ? " --output $outputPath" : ""; + $output = $outputPath ? " --output '$outputPath'" : ""; $mode = " {$this->mode}"; $pages = $this->pages ? " --pages {$this->pages}" : ""; $password = $this->password ? " --password {$this->password}" : ""; @@ -202,7 +202,7 @@ protected function runCommand($outputPath = null) $areas = $this->areas ? $this->areas->toDelimitedString(" -T ") : ""; $regions = $this->regions ? $this->regions->toDelimitedString(" -R ") : ""; - $cmd = "camelot --format csv {$output}{$pages}{$password}{$flagSize}{$split}{$strip}{$mode}{$textShift}{$copyText}{$lineScale}{$edgeTolerance}{$rowTolerance}{$background}{$plot}{$areas}{$regions}{$columnSeparators} " . $this->path; + $cmd = "camelot --format csv {$output}{$pages}{$password}{$flagSize}{$split}{$strip}{$mode}{$textShift}{$copyText}{$lineScale}{$edgeTolerance}{$rowTolerance}{$background}{$plot}{$areas}{$regions}{$columnSeparators} "."'$this->path'"; $process = Process::fromShellCommandline($cmd); $process->run();