From 087299cf8473b07a6872e8019e3f0b465187b4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 16 May 2018 08:48:37 +0200 Subject: [PATCH] Added Unoconv 0.6 switch because converting text documents to pdf fails --- application/libraries/DocumentLib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/libraries/DocumentLib.php b/application/libraries/DocumentLib.php index 6def51ab5..ed87a9f38 100644 --- a/application/libraries/DocumentLib.php +++ b/application/libraries/DocumentLib.php @@ -57,6 +57,10 @@ class DocumentLib case 'application/vnd.ms-word': case 'application/vnd.oasis.opendocument.text': case 'text/plain': + // Unoconv Version 0.6 seems to fail on converting TXT Files + if ($this->unoconv_version == '0.6') + return error(); + $ret = $this->convert($filename, $outFile, 'pdf'); if(isSuccess($ret)) { @@ -64,7 +68,7 @@ class DocumentLib } else { - return $ret; + return error($ret->retval); } case 'application/pdf': return success($filename);