Your Moodle version

Blocks: pdf2submission

Maintained by Picture of Toshihiro KITA Toshihiro KITA
pdf2submission is a plugin to automatically accept hand-written or hand-drawn documents (scanned image PDF) as Moodle assignment submissions (There is no need for each learner to upload the file to Moodle).
Moodle 2.3, 2.4, 2.5, 2.6
== pdf2submission plugin version 2 ==

pdf2submission is a plugin to automatically accept handwritten or hand drawn documents (scanned image PDF) as Moodle assignment submissions (There is no need for each learner to upload the fi
le to Moodle).

Please note that this versin of pdf2submission works only for Assignment2.3 (not for previous type of Assignment).

This package includes FPDI and TCPDF in the subdirectories. See the license description in each subdirectory. Except these subdirectories, pdf2submission is licensed under GPL v3 or later.

How to install:

Basically, pdf2submission plugin is intended to run on Linux servers (some external commands are used in processing PDF files).

1) Install required external commands if they are not yet available on your Moodle server.

The required external commands are pdftk, ImageMagick convert, ghostscript, zbarimg.

On CentOS 6, the following yum command will install all except zbarimg command:
# yum install pdftk ImageMagick ImageMagick-devel ghostscript

pdftk is found also at

For zbarimg command, get the source code from
ar/ and make install like:
bunzip2 zbar-0.10.tar.bz2
tar xvf zbar-0.10.tar
./configure --with-x=no --enable-video=no --with-python=no --with-gtk=no --with-qt=no
make install

2) unzip and move pdf2submission folder into Moodle blocks/ folder, and as admin click 'Site administration - Notifications' to let Moodle install pdf2submission block (like a typical block installation).

3) 'inputfolder' specified in pdfscan.php (where scanned image PDF files are put) must be writable by pdf2submission cron job, so you need to set write permission by a command like 'chgrp apache /home/pdf2moodle/pdfs; chmod g+w /home/pdf2moodle/pdfs'.

KITA Toshihiro


Screenshot #0
Screenshot #1


Picture of Toshihiro KITA
Toshihiro KITA (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • MD shot of me from his iphone4
    Thu, Sep 20, 2012, 3:18 AM
    Hi Toshihiro, thanks for submitting your plugin smile
    I've looked at it and i've these points about others who may try to use it:
    - pdfgen.php uses lookups into mod_assign tables directly, it might be better to use mod_assign's functions from lib.php if possible so it keeps up with upgrades (DB etc) within mod_assign.
    - pdfscan.php has some hardcoded paths to executables. it would be better to have these as settings for non-programmers to be able to use this plugin.
    - generally there are non-unix OS users who won't be able to use this easily. Have you tried and do you have any advice for them? (ie: windows users)
    It seems generally that this might be better placed as a sub-plugin for mod_assign as it seems specific to it.
  • MD shot of me from his iphone4
    Thu, Sep 27, 2012, 1:01 PM
    Hi Toshihiro,
    once again thanks for your plugin.
    We do need some of the url fields filled in which will help in this plugin feedback and maintenance:
    - perhaps website url could be ?
    - documentation url
    - tracker url for issues.
    see here for the URL fields -
  • Picture of Toshihiro KITA
    Thu, Jun 4, 2015, 10:54 PM
    New version for Moodle 2.8/2.9 (maybe also 2.7) is here:
    i wish to put the new version here in this directory when i have time..
Please login to post comments