Just to add 2 more cents to the confusion ... have had a 3.1 on a CentOS 6 box working. Went back to it and visited to find out the 'test pdf' file no longer displayed. Soooooo ... off into yet another venture in Moodle La-La Land. :\
CentOS Linux 6.8
PHP 5.5.38
unoconv 0.7
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/
platform posix/linux2
python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
LibreOffice 4.3.7.2
Had to re-do the listener ... saw some errors in logs:
Error: Unable to connect or start own listener. Aborting.
[root@visdmoodle unotest]# /usr/bin/unoconv -vvv -f pdf unoconvtest.docx
Verbosity set to level 3
Using office base path: /usr/lib64/libreoffice
Using office binary path: /usr/lib64/libreoffice/program
DEBUG: Connection type: socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
DEBUG: Existing listener not found.
DEBUG: Launching our own listener using /usr/lib64/libreoffice/program/soffice.bin.
LibreOffice listener successfully started. (pid=913)
Input file: unoconvtest.docx
Selected output format: Portable Document Format [.pdf]
Selected office filter: writer_pdf_Export
Used doctype: document
Output file: file:///root/unotest/unoconvtest.pdf
DEBUG: Terminating LibreOffice instance.
DEBUG: Waiting for LibreOffice instance to exit.
Tracked down to the listener ... not working.
Got that fixed - thanks to docs on Moodle.org for setting up a listener for CentOS 6 ... did have to change a path to where the listener was to find the version of LibreOffice being used.
But ... managed to get it working again and this time created a test course, test student with assignments asking for an ODT and a DOCX to see if the system converted for Teacher to annotate.
Grumble, grumble, grumble ... won't share what I really said to myself
Not working ...
Well, 5 hours later ...
Command line test checked out:
[root@visdmoodle unotest]# unoconv -vvv -f pdf hp-unoconvtest.docx
Verbosity set to level 3
Using office base path: /usr/lib64/libreoffice
Using office binary path: /usr/lib64/libreoffice/program
DEBUG: Connection type: socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
Input file: hp-unoconvtest.docx
Selected output format: Portable Document Format [.pdf]
Selected office filter: writer_pdf_Export
Used doctype: document
Output file: file:///var/www/html/moodle31/unotest/hp-unoconvtest.pdf
An older version of libreoffice used on this box but it converts via command line just fine.
Test button for test PDF nada/zip/blank pdf ... and no rendering for Teacher to annotate.
More GRUMBLE GRUMBLE!
When it wasn't working the files that had been submitted were draft.
DB query:
select contenthash,filename,component,filearea from `mdl_files` where `filename` like "%unoconv%";
showed that.
The test file is in filedir:
Row in my DB:
7b31b67545a1288f9545bfce904a7efb72795e94 348a9e14124c26f685e3abd37dca286016a685fc 1 core documentconversion 0 /pdf/ 6faee9e044dcb1d3629e270a5f34e77b1ed620f9
24680 application/pdf 0
Note area is core and the file name is a hash ... nothing humanly recognizable ... of course they say in the PDF (when/if you get to see it) you shouldn't use it.
It won't be found using the: Download the converted pdf test file.
Did something one shouldn't do ... I removed a row in the DB ... but NOT in filedir.
Well, I'll be dang! Logged on as student using a different browser.
Resubmitted the file - this time added one line to the file/doc.
In another browser as teacher/admin of system could see the submitted file ... an .odt.
AND THIS TIME ... annotation works! I can see the .odt converted in the grading window and can annotate.
Hmmmm ...
There is a task for converting submissions ...
Execute scheduled task: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)
... started 18:49:06. Current memory use 87.2MB.
Convert 1 submission attempt(s) for assignment 1
Convert 1 submission attempt(s) for assignment 2
Conversion failed with error:storedfilecannotread
That last line was the row in the DB I deleted manually from DB but NOT from filedir.
So, here's a question ... cron job running? Do you see a "prepare submissions for annotation' like above when cron is run?
Now also this begs the question ... will it stay? Continue to work ... or will it flake out again. :\
For today ... am putting this on to bed and me to the couch. Have had all the 'fun' I can handle for one day!
'spirit of sharing', Ken