Assignment Grading -Annotated PDF shows a blank page

Re: Assignment Grading -Annotated PDF shows a blank page

by Ken Task -
Number of replies: 8
Picture of Particularly helpful Moodlers

You might need to update LibreOffice ...

Mine: /usr/bin/soffice --version

shows: LibreOffice 5.3.6.1 30(Build:1)

You didn't shared back this info:

/sbin/service unoconv status

Should show a green character then:
● unoconv.service - Unoconv listener for document conversions
Is it active?

If you have no service listening then it also won't work!

If you un-install unoconv (could do that simply by removing the python script in /usr/bin file is unovonv ... but IF you do then it's broken for sure! 

Only alternative would be Google conversions.   And you are 'worried' about that as well.   Soooo ... I can't make any calls for you.  You decide ... it's why you make the 'big bucks', right?

See: https://docs.moodle.org/38/en/Google_Drive_converter

and if you are gonna raise an issue of privacy using Google, then guess you'll have to find a way to make unoconv work!

My advice ... leave unoconv installed and upgrade LibreOffice.

Both unoconv and Google (once set up) can co-exist on server.   In Moodle admin interface, admin user chooses which the system is to use.  The other then is dormant for all practical purposes.   Never called by Moodle code at least!

Yes, unoconv listener has been problematic from time to time ... and needed restarting to properly function.

Use whatever works on your system and has the least need for troubleshooting ... hmmmm ... does anyone have a moodle server that *never* has issues from time to time? .... in a 'perfect' world!  Hmmmm ... is there such a thing! smile

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Assignment Grading -Annotated PDF shows a blank page

by Dave Weninger -
Dear Ken,

I have already upgrade the LibreOffice but the Annotated PDF still shows blank page. Sorry, I don't know how to start the service unoconv. unoconv.service is not active. I don't have service listening. Please advise.
And also, we have some teachers who teaches Chinese language. Should I download and install Chinese language pack for LibreOffice? Or, it has already included the language pack?

[root@moodle ~]# unoconv -V
unoconv 0.8.2
Written by Dag Wieers Homepage at http://dag.wieers.com/home-made/unoconv/

platform posix/linux
python 3.5.9 (default, Dec 6 2019, 12:17:35)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
LibreOffice 6.3.4.2
[root@moodle ~]#

[root@moodle ~]# /sbin/service unoconv status
Redirecting to /bin/systemctl status unoconv.service
Unit unoconv.service could not be found.

[root@moodle ~]# bin/systemctl status unoconv.service
-bash: bin/systemctl: No such file or directory

[root@moodle ~]# soffice --version
-bash: soffice: command not found

[root@moodle ~]# find / -name soffice
/opt/libreoffice6.3/program/soffice

[root@moodle ~]# /opt/libreoffice6.3/program/soffice --version
LibreOffice 6.3.4.2 60da17e045e08f1793c57c00ba83cdfce946d0aa

[root@moodle ~]# whereis gs
gs: /usr/bin/gs /usr/share/man/man1/gs.1.gz

[root@moodle ~]# /usr/bin/gs --version
9.25

[root@moodle ~]# ps -ef |grep unoconv
root 16755 16126 0 23:00 pts/0 00:00:00 grep --color=auto unoconv
[root@moodle ~]# ps -ef |grep soffice
root 16761 16126 0 23:00 pts/0 00:00:00 grep --color=auto soffice

Thank you very much.
Best Regards,

Kelvin Ma
In reply to Dave Weninger

Re: Assignment Grading -Annotated PDF shows a blank page

by Ken Task -
Picture of Particularly helpful Moodlers

Please see:

https://docs.moodle.org/38/en/Universal_Office_Converter_(unoconv)#Run_a_unoconv_listener

and the links to directions for your platform on the page from the link above:

Upstart script for Ubuntu based systems
Launchd script for OS X
Init script for Debian
Init script for CentOS/RedHat 6.x
SystemD service script for CentOS/RedHat 7.x

'SoS', Ken

Average of ratings: Useful (1)
In reply to Dave Weninger

Re: Assignment Grading -Annotated PDF shows a blank page

by Ken Task -
Picture of Particularly helpful Moodlers

Not sure what language packs for default LibreOffice.  Do remember at one time in the past having to install other language packs ... but don't remember details.  Also remember, due to server space limitation, having to remove language packs to gain back some space (must have done a global kinda install and got too much!).

https://wiki.documentfoundation.org/Documentation/Install/Linux

Might help.

also ... DB server would have to be utf8mb4 with collation from utf8mb4 family to use/support Asian languages.

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Assignment Grading -Annotated PDF shows a blank page

by Dave Weninger -
Thank you very much for your great support.

The Annotated PDF works well for English language now. However, it still cannot show Chinese characters. I have installed the traditional Chinese language pack from the below website.
https://download.documentfoundation.org/libreoffice/stable/6.3.4/rpm/x86_64/LibreOffice_6.3.4_Linux_x86-64_rpm_langpack_zh-TW.tar.gz.mirrorlist

download the language pack: LibreOffice_6.3.4_Linux_x86-64_rpm_langpack_zh-TW.tar.gz
WinSCP upload to /sources/libreoffice-6.3.4-languagepack
cd /sources
cd libreoffice-6.3.4-languagepack
cd LibreOffice_6.3.4.2_Linux_x86-64_rpm_langpack_zh-TW
cd RPMS
yum localinstall *.rpm


[root@moodle ~]# rpm -qa|grep libreoffice
libreoffice6.3-freedesktop-menus-6.3.4-2.noarch
libreoffice6.3-base-6.3.4.2-2.x86_64
libreoffice6.3-dict-en-6.3.4.2-2.x86_64
libreoffice6.3-dict-fr-6.3.4.2-2.x86_64
libreoffice6.3-6.3.4.2-2.x86_64
libreoffice6.3-math-6.3.4.2-2.x86_64
libreoffice6.3-impress-6.3.4.2-2.x86_64
libreoffice6.3-zh-TW-6.3.4.2-2.x86_64
libreoffice6.3-draw-6.3.4.2-2.x86_64
libreoffice6.3-calc-6.3.4.2-2.x86_64
libreoffice6.3-en-US-6.3.4.2-2.x86_64
libreoffice6.3-ure-6.3.4.2-2.x86_64
libreoffice6.3-writer-6.3.4.2-2.x86_64
libreoffice6.3-dict-es-6.3.4.2-2.x86_64
libobasis6.3-libreofficekit-data-6.3.4.2-2.x86_64

Also, I checked that our mysql supports utf8mb4_unicode_ci . What steps had I missed?

Please kindly advise if you know. Thank you very much.
Best Regards,
Kelvin Ma
In reply to Dave Weninger

Re: Assignment Grading -Annotated PDF shows a blank page

by Ken Task -
Picture of Particularly helpful Moodlers

After re-reading, me thinks you have misunderstood the capabilities of Annotation/unoconv/LIbreoffice and how Moodle works.

If a word doc (or document type moodle unoconv could convert to PDF) is in English, the resulting PDF is in English.

For a teacher to see a PDF in zh_tw the student would have to submit the doc in zh_tw.

In other words, what you are working on doesn't translate contents of  documents from any language to desired language.

'SoS', Ken



In reply to Ken Task

Re: Assignment Grading -Annotated PDF shows a blank page

by Dave Weninger -

I haven't misunderstood. The teacher who teaches Chinese language subject asks for an assignment written in Chinese (zh_tw). The student certainly submits his assignment written in Chinese (zh_tw). I also tested by submitting a dummy assignment written in Chinese (zh_tw), but it shows  square symbol instead of Chinese characters (e.g. 大學)

Kelvin Ma



In reply to Dave Weninger

Re: Assignment Grading -Annotated PDF shows a blank page

by Ken Task -
Picture of Particularly helpful Moodlers

What's the language of the course?

And confirm (for yourself - am not requesting response here as we've done this before, right?):

1. you do have the Moodle zh_tw language pack installed in the moodle.

2. a command line test of unoconv converts a .docx to a .pdf.  And that the PDF is readable.

3. in config.php file the variable for DB collations is set to utf8mb4 family

4. that the DB, tables, and all columns in the tables match the collation seen in config.php (cli scripts in admin/cli/)

That's about all I have to suggest!

'SoS', Ken