Skip to content

Commit

Permalink
Merge pull request #19 from kordos/feature/rtf_to_pdf
Browse files Browse the repository at this point in the history
Allow rtf conversion to pdf as it is available in Libre Office
  • Loading branch information
ncjoes authored May 11, 2020
2 parents a163442 + ef2e10f commit b0e5493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OfficeConverter/OfficeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private function getAllowedConverter($extension = null)
'Jpg' => ['pdf'],
'Jpeg' => ['pdf'],
'Jfif' => ['pdf'],
'rtf' => ['docx', 'txt'],
'rtf' => ['docx', 'txt', 'pdf'],
'txt' => ['pdf', 'odt', 'doc', 'docx', 'html'],
];

Expand Down Expand Up @@ -241,7 +241,7 @@ private function exec($cmd, $input = '')
// getenv('HOME') isn't set on Windows and generates a Notice.
if ($this->prefixExecWithExportHome) {
$home = getenv('HOME');
if (false === $home || !is_writable($home)) {
if (!is_writable($home)) {
$cmd = 'export HOME=/tmp && '.$cmd;
}
}
Expand Down

0 comments on commit b0e5493

Please sign in to comment.