I first installed nextcloud-20.0.11-1.v7.noarch via yum onto a system running ClearOS 7.9.1 (based on CentOS 7.9 which is based on RHEL 7.9). After setting up Nextcloud and uploading some XLS, XLSX, PPT, PPTX, DOC, DOCX, ODS, ODP, ODT files I tried to view them in the Nextcloud iPadOS app but I got an error:
Error
Failed to open the requested file.
I installed LibreOffice via yum. There were heaps of LibreOffice rpms when I used yum search libreoffice, I first tried:
yum install libreoffice-calc libreoffice-impress libreoffice-writer
After testing again and getting the same error I next tried:
yum install libreoffice
As a result of those two commands the following libreoffice packages were installed:
libreoffice-5.3.6.1-25.el7_9.x86_64
libreoffice-base-5.3.6.1-25.el7_9.x86_64
libreoffice-calc-5.3.6.1-25.el7_9.x86_64
libreoffice-core-5.3.6.1-25.el7_9.x86_64
libreoffice-data-5.3.6.1-25.el7_9.noarch
libreoffice-draw-5.3.6.1-25.el7_9.x86_64
libreoffice-emailmerge-5.3.6.1-25.el7_9.x86_64
libreoffice-graphicfilter-5.3.6.1-25.el7_9.x86_64
libreoffice-gtk2-5.3.6.1-25.el7_9.x86_64
libreoffice-gtk3-5.3.6.1-25.el7_9.x86_64
libreoffice-impress-5.3.6.1-25.el7_9.x86_64
libreoffice-langpack-en-5.3.6.1-25.el7_9.x86_64
libreoffice-math-5.3.6.1-25.el7_9.x86_64
libreoffice-opensymbol-fonts-5.3.6.1-25.el7_9.noarch
libreoffice-pdfimport-5.3.6.1-25.el7_9.x86_64
libreoffice-pyuno-5.3.6.1-25.el7_9.x86_64
libreoffice-ure-5.3.6.1-25.el7_9.x86_64
libreoffice-ure-common-5.3.6.1-25.el7_9.noarch
libreoffice-writer-5.3.6.1-25.el7_9.x86_64
libreoffice-x11-5.3.6.1-25.el7_9.x86_64
After testing again and getting the same error I next tried editing the /etc/nextcloud/config.php file and adding the following:
'enable_previews' => true,
'preview_libreoffice_path' => '/usr/bin/libreoffice',
'enabledPreviewProviders' => [
'OC\Preview\PNG',
'OC\Preview\JPEG',
'OC\Preview\GIF',
'OC\Preview\HEIC',
'OC\Preview\BMP',
'OC\Preview\XBitmap',
'OC\Preview\MP3',
'OC\Preview\TXT',
'OC\Preview\MarkDown',
'OC\Preview\OpenDocument',
'OC\Preview\Krita',
'OC\Preview\MSOffice2003',
'OC\Preview\MSOffice2007',
'OC\Preview\MSOfficeDoc',
],
After still getting the error I tried editing the /etc/nextcloud/config.php file and adding the following:
'preview_office_cl_parameters' =>
' --headless --nologo --nofirststartwizard --invisible --norestore '.
'--convert-to png --outdir ',
But I’m still unable to preview office documents in the Nextcloud app. I can preview PDF files. What am I missing?