diff --git a/src/OfficeConverter/OfficeConverter.php b/src/OfficeConverter/OfficeConverter.php index 91716a8..540e699 100755 --- a/src/OfficeConverter/OfficeConverter.php +++ b/src/OfficeConverter/OfficeConverter.php @@ -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'], ]; @@ -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; } }