Your Moodle version

Assignment submissions : PDF submission

Maintained by Davo Davo Smith
This allows a teacher to annotate and return PDF files that have been submitted by students. Teachers can add and position comments and draw lines, ovals, stamps, rectangles and highlights onto the student's work, from within the browser.

This plugin and the associated feedback plugin, do still, technically, work with Moodle 3.1, but they sit very awkwardly alongside the new grading layout. If you haven't switched over yet, now is the time to do so.

Important note - PDF annotation (based on the PDF feedback part of this plugin) is now part of Moodle core (from Moodle 2.6 onwards). 

There is currently no code available to migrate existing assignments using my plugin to the core version. However, I would recommend that all future assignments are created using the core Moodle functionality - I do not intend to maintain this version indefinitely (although I will attempt to fix any major compatibility bugs that arise in future versions).

Note also that there are a number of significant differences between the plugin version and the Moodle 2.6 built-in version of PDF annotation. The documentation below is only relevant to the plugin version; questions or problems about the built-in version should be directed to the Moodle forums or

These plugins for the assignment module allows a teacher to annotate and return PDF files that have been submitted by students. It is based on my previous 'UploadPDF' assignment type, updated to work with the Moodle 2.3+ 'assign' module (rather than the Moodle 2.0-2.2 'assignment' module).

Teachers can add and position comments and draw lines, ovals, stamps, rectangles and highlights onto the student's work, from within the browser, before returning the work to the student.

This plugin is available in Moodle 2.3+, Moodle 2.0-2.2 and Moodle 1.9 versions.
This is the Moodle 2.3+ version - you can download the Moodle 1.9 version from here:
and the Moodle 2.0-2.2 version here:



Note - the assignsubmission_pdf plugin can, theoretically, be used without the assignfeedback_pdf plugin ( On its own, however, it has little advantage over the standard 'file' submission plugin (other than coversheet handling). The assignfeedback_pdf will not do anything on its own (and cannot be installed without the submission plugin).

  1. Download and install GhostScript ( ) - or install from standard respositories, if using Linux.
    Under Windows, do not install to a path with a space in it - that means you should install to something like 'c:\gs' NOT 'c:\Program Files\gs' (note you only need the files 'gswin32c.exe' and the dll file from the 'bin' folder, all other files are unnecessary for this to work).
  2. Unzip the submission pdf and feedback pdf plugin files to folders on your local machine
  3. Upload the plugin files to <siteroot>/mod/assign/submission/pdf and <siteroot>/mod/assign/feedback/pdf
  4. Log in to Moodle as administrator, then click on 'Home'.
  5. Visit 'Site admin > Plugins > Assignment plugins > Feedback Plugins > PDF Feedback'. Adjust the 'Ghostscript path' to where ghostscript is installed (should not need changing on a Linux install).

All being well, you should now be able to add submission and feedback type 'pdf' to assignments.

How to use

  • Add a new Assignment to a course.
  • Configure all the usual settings - you should be aware of the following additions:
    • PDF submission - set to 'Yes' to allow students to submit PDFs for annotation
    • PDF feedback - set to 'Yes' to allow the submitted PDFs to be annotated (note this ONLY works with PDFs submitted via the 'PDF submission' plugin).
    • Coversheet - this is a PDF that will be automatically added to the start of any files submitted by your students
    • Template - before submission your students can be (optionally) asked to fill in some text fields, the template is used to add these entries to the coversheet (this is ignored, if no coversheet is selected).
    • Edit Templates... - see section below

It is recommended this is used with the 'Require students click submit button' option, as then the processing and combining of the submission PDFs is only done once they click that button. Otherwise, the processing is done every time the student updates their submission.

  • When a student uploads their files and clicks 'Submit' they will be combined them together into a single submission (along with the coversheet).

(Hint: to help students generate PDF files, install a PDF printer, such as PDF Creator - ).

  •  The teacher can then log in, go to the usual marking screen and click on 'Annotate submission', which will bring up the first page of the student's work on screen.
  • Click anywhere on the image of the PDF to add a comment. Use the resize handle in the bottom-right corner of a comment to resize it, click & drag on a comment to move it. Click (without dragging) on a comment to edit it, delete all the text in a comment to remove it.
  • Right-click on a comment to add it to a 'Comment Quicklist'. You can then right-click anywhere on a page to insert comments from this 'Comment Quicklist' (with the same text, width and background as the original). Comments can be deleted from the 'Comment Quicklist' by clicking on the 'X' to the right of the comment.
  • You can add lines to the PDF by holding 'Ctrl' ('Alt' on Apple Macs) whilst you click and drag with the mouse (or alternatively hold 'Ctrl' then click once for the start and once for the end of the line).
  • You can also choose different drawing tools by clicking on the icons or by using the keys c (comments), l (lines), r (rectangles), o (ovals), f (freehand lines), e (erase lines), [ & ] (change comment colour), { & } (change line colour)
  • Navigate between the pages by clicking on the 'Next' and 'Prev' buttons or by pressing 'n' and 'p' on the keyboard.
  • Click on 'Save Draft and Close' (or just navigate to a different page) to save the work in progress.
  • Click on the 'Generate Response' icon to create a new PDF with all your annotations present (that the student will be able to access).
  • You can view the comments you have made on a student's previous submissions by choosing that submission from the 'compare to' list
  • You can quickly find comments you have previously made by clicking on the 'find comment' list.
  • Add any feedback / grades to the usual form and save them.

Edit Templates

  • Click on the 'Edit Templates...' link on the 'Settings' page
  • Choose the name of the Template to edit (or select 'New Template...')
  • You can change the name of the template, delete the template or make it available to everyone on the site (administrators only, for this last option). Only administrators can edit site templates.
    Note: you cannot delete templates that are in use (click 'show' to find out where it is currently being used)
  • The list at the bottom allows you to choose an item in the template to edit, or choose 'New Item...' to add a new one.
  • The types of item you can add are:
    • text - a block of text, which will re-flow at 'width' pixels, 'value' will be the prompt the student sees to fill this in
    • shorttext - similar to text, but without word-wrapping useful for 'name' or 'type your initials to state this is all your own work'
    • date - fills in the date that the assignment was submitted, 'value' is the format to record the date
  • To position the items on the template, upload an example PDF coversheet (using the bottom form) then type in the position you want to place the PDF (x position, y position, in pixels).
    Alternatively, click on the coversheet image to set the position of that template item.
  • When you are finished, save any items you have changed, then close the window. The list of templates on the 'settings' page should have been updated.

Known issues

There is no way to annotate the PDFs without JavaScript.

Backup & restore will not transfer coversheet templates to a different site (it will work fine on a single site). This is a limitation of the assignment backup & restore process.


This makes use of GhostScript and the FPDI and TCPDF libraries for PDF manipulation; Mootools is used to help with the JavaScript and Raphael provides the cross-browser annotation support.

Thanks to the creators of all those libraries, as this wouldn't have been possible without their hard work (and their free software licensing)


This plugin is part of set Assignment: PDF.


Screenshot #0
Screenshot #1


Davo Smith (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Davo
    Wed, Oct 8, 2014, 3:55 AM
    Feng - it would be a very large amount of work to make the toolbar floating, which is why all the tools have keyboard shortcuts to select them. Click on the 'help' button at the top for a list of all the shortcuts.
  • Jim Judges
    Tue, Dec 2, 2014, 8:37 PM
    Now that Feedback is in core moodle can you confirm if assignsubmission_pdf plugin can be installed on its own without assignfeedback_pdf - we just want to use the coversheet functionality.
  • Davo
    Tue, Dec 2, 2014, 8:40 PM
    I've not done a test install without the assignfeedback_pdf plugin.

    You would probably need to edit the dependencies in the version.php file and it might work (but I am not sure it would find the PDF manipulation functions which are used by both halves of the plugin and which are stored inside the feedback part).

    If it doesn't work, please let me know and I can investigate further, when I have time.
  • Picture of Bei Chapman
    Wed, Dec 10, 2014, 5:41 AM
    Hi Davo,

    One of our student submitted a pdf file for his assignment, but when the instructor downloaded and/or opened it up, the pdf lost its original italics font. It seems like only happened to this particular student's submission. We couldn't figure out why.

    Have you ever heard about the similar case? If not, does assignsubmission_pdf plugin tries to alter the file content (in terms of font) and save it after?

  • Davo
    Wed, Dec 10, 2014, 6:57 AM
    Bei - please can you confirm that you are using my plugin, rather than the built-in PDF annotation in Moodle 2.6 (and above)?

    There is some pre-processing that is done on PDFs that are greater than version 1.4 (you can check the version number via File, Properties in Adobe Reader) - this is because the FPDI library used to generate the final PDF can only cope with this version and below (unless a separate site licence is purchased from the publishers of this library).

    The PDF is processed again to produce the final output.

    I've not, however, come across italics being removed from a file during submission (but, then, it's been a while since I've been using this plugin on a day to day basis).
  • Picture of Bei Chapman
    Fri, Dec 12, 2014, 4:55 AM

    Thanks for your such a quick response.

    I am using the moodle 2.6.2 built-in PDF annotation now (used to use your plugin).

    $plugin->version = 2014022700;
    $plugin->release = "2.5+ (Build 2014022700)";
    $plugin->component = 'assignsubmission_pdf';

    Thanks for pointing out that pre-processing part. I did check the version of the original document, which is 1.5, and of course the submitted and then downloaded version from Moodle is changed to 1.4, which explains why we are losing the italics font. Also that well explains why this situation only happens to certain users not all.

    Since the PDF version compatibility issue exists, do you know if Moodle is trying to solve it or not in the future? Anyone else is complaining it?

    Many thanks,

  • Davo
    Fri, Dec 12, 2014, 6:44 AM
    I've not seen any other complaints about it, but I am not on the receiving end of them (as I'm not responsible for the maintenance of the core version of the plugin - it was extensively rewritten when it was put into core).

    The preprocessing is the responsibility of ghostscript, so it may be possible that a newer version of ghostscript may manage the conversion more accurately. The alternative would be to remove the pre-processing step and buy a copy of the commercial FPDI PDF parser ( ).

    Short of writing an open-source PDF parser for versions > 1.4 (a really massive job), there probably ins't a lot that Moodle HQ can do.
  • Picture of Nick Phillips
    Thu, Jun 2, 2016, 8:34 AM
    Is there a recommended way to uninstall these, other than editing the version.pdf in each (submission, feedback) part to remove the dependency line? (as each depends on the other, neither is allowed to be uninstalled by standard uninstall process)
  • Picture of Nick Phillips
    Thu, Jun 2, 2016, 8:34 AM
    I mean version.php, of course. PDF on the brain.
  • Davo
    Tue, Jun 7, 2016, 1:20 AM
    Hi Nick,

    Sorry - I've been away, so only just able to reply to your message now. I've not tried to uninstall these plugins through the UI. It sounds like a core Moodle bug that you can't do so without editing version.php, but, for the moment, that's probably the best solution.
  • Picture of Jürg Hoerner
    Tue, Sep 27, 2016, 3:29 AM
    Hi Davo

    How I can uninstall this plugin with the assignfeedback_pdf in moodle 3.1?

    Thank you for your answer.
  • Davo
    Tue, Sep 27, 2016, 3:39 AM
    You should be able to uninstall from the plugins overview page - then delete the code from the directories on your server.
  • Picture of Jürg Hoerner
    Tue, Sep 27, 2016, 4:18 AM
    This is not possible in my installation: PDF submission and PDF Feedback are the only two plugins, with no uninstall Link.
  • Davo
    Tue, Sep 27, 2016, 4:22 AM
    I think that is a bug in Moodle, because the two plugins depend on each other, so you can never uninstall one without the other complaining. I suggest you edit the version.php file for one (or both) of the plugins and delete the '$dependencies' section at the bottom of the file - you should then be able to delete one, then the other plugin.
  • Picture of Laurent Labidi
    Wed, Oct 12, 2016, 3:42 AM
    Hello Davo

    Thanks for the tips...i had the same pb than Jürg.

    Good job !
1 2 3 4 5
Please login to post comments