.pdf not opening in moodle3.7.2+

.pdf not opening in moodle3.7.2+

by kamal jindal -
Number of replies: 6

I am following the following steps

1) I click on the assignment, it give me the list of students (submitted).

2) I click on View all submissions

3) I click on Grade for an assignment where the status is Submitted for grading

(4) The new page shows a large area on the left with the message "Generating the pdf..."

After some time i get the following image...


in this nothing is generated in the pdf area. so i can not see the actual submission.

I am unable to solve this problem after a number of tries.

can any one tell me the exact reason/solution to this.


Average of ratings: -
In reply to kamal jindal

Re: .pdf not opening in moodle3.7.2+

by Acqua Alta -
Hi Kamal,
Did you do a search in these forums before you posted? I remember a couple of threads regarding such problems, and maybe you'll find the answer in one of them.

I even opened one myself, about a bug that causes some submissions to be unenviable:
In reply to kamal jindal

Re: .pdf not opening in moodle3.7.2+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to configure Ghostscript.

Site administration > Server > Server paths

Obviously, you'll need to install Ghostscript on whatever operating system your server is running first
In reply to Howard Miller

Re: .pdf not opening in moodle3.7.2+

by kamal jindal -
Ghostscript is configured and i have tested "it is working fine" but no improvement in results(assignment file not available for grading)
In reply to kamal jindal

Re: .pdf not opening in moodle3.7.2+

by Ken Task -
Picture of Particularly helpful Moodlers

Not, bragging, but ... have a Moodle 3.7.2+ (Build: 20190927) instance which is working just fine.

Suggest possibly an issue with moodledata/ where moodle stores
all uploaded files ... including assignments.

2 places to check:
moodledata//temp/

In moodledata/temp/assignfeedback_editpdf_test you should see a png file.
In moodledata/temp/assignfeedback_editpdf successful will have a subdirectory called 'pageimages' and contained therein files used in.

check ownerships/permissions overall on moodledata.

In Assignments of Moodle versions @3.6.highest and below did not have
a setting for 'accepted file types' ... student allowed to upload certain file types. (like a .docx, .doc, .pdf)

In Assignments of Moodle 3.7->, there is a global setting:
Site administration -> Plugins -> Activity modules -> Assignment -> Submission plugins -> File submissions

Default accepted file types is set or should be set to * (all).

In each Assignment, there is a setting for Submission types.
Accepted file types ... which might need setting.

Sometimes ... not always ... but with PDF's submitted a factor is the PDF file
uploaded by the student.  What did student use to create a PDF?

Also check File Type definitions for PDF's:
/admin/tool/filetypes/edit.php?oldextension=pdf

extension: pdf
MIME Type: application/pdf
Type Groups: document

Suggest turning on Debugging to see what else Moodle might have to say.

'SoS', Ken


Average of ratings: Useful (2)
In reply to kamal jindal

Re: .pdf not opening in moodle3.7.2+

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
So once you get everything working, you will need to test with a new upload...have you tried deleting the files and reuploading it? Sometimes that is all it takes...