Installed unoconv and libre office as in https://docs.moodle.org/35/en/Universal_Office_Converter_(unoconv).
When trying to annotate a .docx, unoconv convert the file to an only blank page.
The generated file is not saved in the assigment; looks like unoconv do no convert anything.
added this first line to the batch file calling unoconv:
echo %* > C:\Unoconv\Unoconv.log
@"C:\Program Files\LibreOffice\program\python.exe" c:\unoconv\unoconv.py -v %* >> C:\Unoconv\Unoconv.log
The %* reports as "--version" in my log file.
I think there's a problem in the invocation of the batch file; maybe wrong/missing parameters.
Any help would be appreciated in this kind of reverse engineering.
I try this in my test environment with same result.
I enabled debug in moodle and when I try unoconv (files/converter/unoconv/testunoconv.php?sendpdf=1&sesskey=Z36rBRvRoN) I have this error
PHP Warning: readfile(): Filename cannot be empty in E:\Sites\learn-dev.cpln.ch\root\lib\filelib.php on line 1942It explains why unoconv is not called with a file to convert...
But how to go further?
It could be a permission related issue but all I found is regarding www-data home folder on linux...
I solved the problem.
- Run unoconv listener with a startup task
- in file "\files\converter\unoconv\classes\converter.php", ligne 339 (function fetch_supported_formats), I added "cmd.exe /c " before the Unoconv.bat path:
$proc = proc_open("cmd.exe /c $cmd", $pipesspec, $pipes);