Blank PDF Annotation and unoconv not in System settings

Blank PDF Annotation and unoconv not in System settings

by COS Admin -
Number of replies: 8

I am running Moodle 3.3 on Ubuntu 16.04 with PHP7.2 through RunCloud as a sandboxed app, and have only default plugins. After I installed ghostscript and successfully tested the system path, I see a blank PDF on the annotation screen for a originally PDF file submission.  According to the Moodle official documentation, PDF files should work without unoconv installed, so what else could be causing this? 

Of course, I tried to actually install unoconv, but there was no apparent difference. I also tried deleting and recreating a test assignment and uploading a different PDF to refresh it, but it's still blank. 

The weirdest part is that I cannot find unoconv in Moodle settings. The installation instructions suggested that for Ubuntu 16.04 a simple apt-get command would be enough, while the 14.04 instructions say that it is necessary to navigate to Site administration > Server > System paths and add the path to unoconv. Unfortunately, there is no setting for unoconv on this page, so I can't set the path. Why would the setting be missing? In any case I can't tell if unoconv is being detected or used by Moodle, because no "test unoconv path" option exists either in the Annotate PDF plugin settings.

Does anyone know how to fix the blank PDF without unoconv, or how to finish and test the unoconv install?

Average of ratings: -
In reply to COS Admin

Re: Blank PDF Annotation and unoconv not in System settings

by Marianne Michel -

Hello.

We solved the problem (Debian 8, Moodle 3.3.1+) creating a .config file in /var/www (home directory of the user www-data) and made a chown www-data:www-data on the file.

After that, you will need to convert twice a first file.

Marianne.


In reply to Marianne Michel

Re: Blank PDF Annotation and unoconv not in System settings

by COS Admin -

Hi, thanks for replying. Can you clarify which problem you solved with this method under what circumstances? Was it PDFs appearing blank without unoconv, or making unoconv's settings available in Moodle? And what should be in the .config file? What does it do?


In reply to COS Admin

Re: Blank PDF Annotation and unoconv not in System settings

by Marianne Michel -

HI.

Unoconv were installed on our pool of Debian 8 machines and we got a blank PDF when trying annotated some *.doc our *.docx documents.

So we read that it was a problem concerning the permissions of the "apache user" (here www-data) who needs to write a .config file in her home directory (here /var/www). That's why we created this file  and put the right permissions on it.

After that the user www-data could use the unoconv library and converts properly the *.doc and *.docx documents.

Marianne.

In reply to Marianne Michel

Re: Blank PDF Annotation and unoconv not in System settings

by COS Admin -

Hi, thanks for clarifying.

However, I still don't quite understand. I have read something similar in the documentation, but not sure how to implement it, or the mechanism that makes it solve the problem.

Firstly, my problem is with showing original PDFs, not converted Word documents, but I am trying the unoconv solution anyways in hopes that it might be related so I am willing to try this out.

Regarding the .config file, should I make a blank file in the web user home directory called .config and assign it to the web user, and that's it?

In reply to COS Admin

Re: Blank PDF Annotation and unoconv not in System settings

by Marianne Michel -

A blank file called .config and assigned to the web user will be fine and that's it.

We didn't do anything else !

In reply to Marianne Michel

Re: Blank PDF Annotation and unoconv not in System settings

by COS Admin -

I just tried this, creating a blank .config file assigned to web user, inside the web user home directory, which I also set permissions to be writeable by the web user. However, after creating a new assignment and uploading a new PDF, I still get the same blank behaviour. Moreover, unoconv settings still aren't visible in Moodle site administration settings. sad

In reply to COS Admin

Re: Blank PDF Annotation and unoconv not in System settings

by Marianne Michel -

OK. Do you try to convert twice ?

At the fisrt time, as we read, it doesn't work but it was working on the second time.

In reply to Marianne Michel

Re: Blank PDF Annotation and unoconv not in System settings

by COS Admin -

Sadly, I tried uploading the same PDF file again after deleting, uploading a different PDF file, and uploading a different PDF file to a new assignment activity I just created, and even uploading a .docx file just to be sure, and all of them still show blank PDFs.