Added Unoconv 0.6 switch because converting text documents to pdf fails

This commit is contained in:
Andreas Österreicher
2018-05-16 08:48:37 +02:00
parent 748ab6fac3
commit 087299cf84
+5 -1
View File
@@ -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);