I followed these steps for installing the libreoffice document previewer:
https : // manual . seafile . com/deploy_pro/office_documents_preview . html
It works fine for docx, pptx, pdf and md, but not for xlsx. There I’m getting this error:
Not Found
The requested URL /office-convert/static/017007dc-f282-4500-adb6-8558a4da753b/38eadca4c3effa18211872fb77a347dc128f580c/Sandbox.xlsx/index.html was not found on this server.
This is what is written in seafevents.log:
[2019-06-27 14:28:14,067] [WARNING] error when invoking libreoffice: Verbosity set to level 3
DEBUG: Connection type: pipe,name=seafilepipe;urp;StarOffice.ComponentContext
Input file: /tmp/tmpJqxNUD.xlsx
Using office base path: /opt/libreoffice4.1
Using office binary path: /opt/libreoffice4.1/program
Selected output format: HTML Document (OpenOffice.org Calc) [.html]
Selected office filter: HTML (StarCalc)
Used doctype: spreadsheet
[2019-06-27 14:28:14,068] [WARNING] failed to convert <type: xlsx, id: 09d3485f21e2eb1e24e41ed262cbda15c29794d3> from excel to html
I was using first the current libreoffice version, installed with apt install and then I installed manually 4.1 as suggested in the documentation.
The conversion itself functions well if I run it manually. This command produces a perfectly valid html file: libreoffice4.1 --invisible --convert-to html Sandbox.xlsx
3 months later the problem is still there. I was hoping that it would be automatically fixed with some update, but now I have Seafile Pro 7.0.8 installed and the Excel Preview still does not work. However, I found some useful information.
The Excel file is successfully converted and stored as index.html file in /tmp/html/blablabla where blablabla seems to be some automatically generated folder name. I can open the file if I browse there and the content is correct, but seafile does not seem to be able to find it. The access rights seem ok. The folder /tmp/html/blablabla belongs to the user seafile (the user that I am using to start seafile and seahub) and the index.html file belongs to the same user as well.
Word, Powerpoint and PDF files are still working fine, however for them no file is generated in /tmp/html so they probably use another mechanism. My problem is, as originally described, with Excel files only.
We are experiencing the same problem with version 7.0.13. @daniel.pan, could please someone take care of this bug? This has been reported more than half a year ago…
I think it is related to a specific operating system and libreoffice version. We are releasing version 7.1. If you still have the problem in version 7.1, we will try to give it a test on based on your specific operating system and libreoffice version
After upgrade from 7.0.10 to 7.1.3 - Ubuntu 19.10, Libreoffice 6.3.5 - and change of the seafevent.conf (adding port 6000 etc:) as described in the manual I have the same issue: pdf, docx, pptx all work fine. But xlsx does not work.
Error: NOT FOUND. The requested URL was not found on this server. Apache server at myserver Port 8999
Does the xlsx preview works differently? Using another port?
Same problem here with .ods (LibreOffice Calc). Works fine with .odw, .pdf etc… It was working with Seafile Pro 6.x, stopped working with 7.0 and still does not work with 7.1.3. Converting to /tmp/seafile-office-output/html/ is happening.
Ah, so this gives more input why it does not work. Docx, pdf, pptx are all converted into pdf files and put into \tmp\seafile-office-output\pdf - and then shown correctly.
Only xlsx (and ods as it seems) are put into …\html.
And this directory seems somehow not correctly addressed in the code.
@daniel.pan: Nothing has changed after upgrade to 7.1.3. I was on Ubuntu 16.04 before and had to upgrade to 18.04.4 after incompatibilities of libraries Seafile is using (libcrypto and others). The used libreoffice version is 6.0.7.
This URL does not match the regexp (in urls.py):
url(r’^office-convert/static/(?P<repo_id>[-0-9a-f]{36})/(?P<commit_id>[0-9a-f]{40})/(?P.+)/(?P[^/].+)$’
because if have a %2F before the filename (flops.ods), and so it returns a 404 error.
If i change %2F with / i have my preview.
Thanks for your answer.
I don’t believe it is a libreoffice version problem (the preview is OK on disk) but a URL construction mismatch with percent chars.
So i will try to investigate further…
Regards.
Running 7.1.9 Pro.
As I upgraded to Ubuntu 20.10 Libreoffice was as well upgraded to version 7.x. Result: overall office preview did not work. So removed and installed 4.6. and preview worked again (I overread the manual where it says it should be 6.2. for seafile 7.1. Anyway, it worked - but did not work again for xlsx files.
Update: deleted libreoffice 4.6 and install libreoffice 7.0.3.1 (not via snap but from repository). Previews works as well! But again xlsx does not work.
Installed on Ubuntu 20.04 a complete fresh Seafile 7.1.9. Pro for my son on his server. Libreoffice version 6.4.6. Office preview worked without problem. BUT again xlsx preview does not work. Same error message “The requested URL was not found on this server”.
Same problem here - using Seafile Server Pro 7.1.13 behind a Apache proxy on Debian 10.8… but only if i access Seafile over Apache.
Excel preview works if i use http://(internal Seafile IP):8000, but not if i use https://(virtual seafile host).
Word and Powerpoint preview works in both cases.
Error in browser: “Not Found - The requested URL was not found on this server.”
URL in browser: https://(virtual seafile host)/lib/03d…c8/file/Excel/(Filename).xls