Wiki export

General plugins (Local) ::: local_wikiexport
Maintained by DavoDavo Smith
This plugin adds the ability to export Moodle wikis as either PDFs or epub documents.
Latest release:
124 sites
11 fans
Current versions available: 2

Wiki export

This plugin adds the ability to export Moodle wikis as either PDFs or epub documents. It was commissioned by the Judicial Institute for Scotland, originally for their Totara LMS implementation, with Synergy Learning as the chosen partner, with Davo Smith providing the development work.

Many thanks to Jackie Carter - Learning Technology Manager, and the rest of the team, at the Judicial Institute for contributing this development back in to the Moodle community.

Further development of this plugin is planned for early 2015.


Once the plugin is installed, you can visit a wiki, then click on the new 'Export as epub' or 'Export as PDF' links that appear in the activity administration block (with javascript enabled, similar links are inserted on the top-right corner of the page).

Users with the 'mod/wiki:managewiki' capability also get a 'Sort pages for export' link, that allows them to choose the order in which pages will appear in the export.

There is an additional global setting which allows a copy of any wikis on the site to be sent (as a PDF) to a given email address, whenever they are updated (note, this will not export all wikis on the site the first time it is configured, it only sends those that have been updated since the email address was first entered).


If you want to add your organisation's logo to the front page of the exported wiki, please replace the file local/wikiexport/pix/logo.png with your logo. Do not alter the file dimensions, it must remain 514 by 182 pixels.

Customise the following language strings, to alter the embedded export information:
'publishername' - set the PDF 'publisher' field
'printed' - set the description on the front page 'This doucment was downloaded on [date]'

(see for more details)


Any enquiries, including custom Moodle development requests, should be sent to


Screenshot #0
Screenshot #1
Screenshot #2


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

Comments RSS

Show comments
  • Fri, Mar 11, 2016, 4:50 AM
    WIth moodle 3.0.1 i receive the following error message:

    Notice: Undefined property: moodle_page::$settingsnav in /var/www/ on line 491 Fatal error: Call to a member function get() on a non-object in /var/www/ on line 492

    and later on as I tried some changes:
    local plugin navigation callback: Please rename 'local_wikiexport_extends_navigation' to 'local_wikiexport_extend_navigation'. Support for the old callback will be dropped in Moodle 3.1
    * line 1308 of /lib/navigationlib.php: call to debugging()
    * line 3426 of /lib/navigationlib.php: call to global_navigation->initialise()
    * line 718 of /lib/pagelib.php: call to settings_navigation->__construct()
    * line 768 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
    * line 6865 of /lib/adminlib.php: call to moodle_page->__get()
    * line 847 of /admin/index.php: call to admin_externalpage_setup()

  • Fri, Mar 11, 2016, 5:06 AM
    error with the newest verstion on github
    Notice: Undefined property: moodle_page::$settingsnav in /var/www/ on line 495 Fatal error: Call to a member function get() on a non-object in /var/www/ on line 496
  • Sat, Oct 29, 2016, 1:11 PM
    I'm trying to export a WiKi in Chinese, but the characters always display as ? marks. Does anybody know how to get Chinese characters to show up in the PDF?
  • Davo
    Sat, Oct 29, 2016, 3:14 PM
    I've not tested, but I assume it is related to the font used to do the export not having any suitable characters in it. If you look in the code, you should be able to switch to using a different font (I don't have the code in front of me now, but if you search for 'setfont' you should find it - the available fonts are in lib/tcpdf/font, again, off the top of my head, without being able to check right now).
  • Sat, Oct 29, 2016, 10:02 PM
    Thank Davo for the suggestion of switching to a different font. I have followed the instructions given by Ciao in to install a new font into the folder: my_moodle_path/lib/tcpdf/fonts. I also changed the font name of 'FreeSerif' to 'DroidSansFallback' in Line 73 of my_moodle_path\lib\pdflib.php. Chinese characters show perfectly now. Thanks!
  • Tue, Feb 7, 2017, 12:36 AM
    Thanks for this great plugin. Any previews for the moodle 3.2 version?
  • Davo
    Tue, Feb 7, 2017, 12:40 AM
    Hi Amaia - it's not quite clear what you're asking for. I've not developed a specific Moodle 3.2 version of this plugin (so there's nothing to offer previews of). At a guess, there is probably no reason not to use the 3.1 version, but I've not done any formal testing to find out.
  • Thu, Jun 1, 2017, 6:47 PM
    Dear Davo,

    thank you for providing this plugin which is very helpful in online teaching. At the moment we are facing a technical problem with one wiki which cannot be solved by our local development team. The wiki shows the following error when trying to export a pdf with the plugin. "Fehler: TCPDF ERROR: Empty font family". Have you heard about this before and could give us a hint where to look at? The error cannot be reproduced in a freshly opened wiki activity so I assume it is to with some content, formatting mistakes?

    Thank you in advance.

    PS. We are using Moodle 3.2 and the latest version of your plugin.
  • Davo
    Thu, Jun 1, 2017, 6:51 PM
    Hi Wiebke - I don't know the answer to that problem off the top of my head. It sounds like somewhere in the content there is a 'font' tag or a 'style' tag with a 'font' style within it. There isn't much else I can offer, other than to suggest you look through each of the pages and remove any unwanted tags (by using the 'view html' button in the text editor.

  • Tue, Jun 6, 2017, 5:28 PM
    Hi Davo, thanks for your quick answer - the same day! The problem was, and I'm only mentioning it here because it might happen also to other users who create their own content, that somebody inserted a table that crashed the page layout. Funny thing was that the epub export did work, and I only noticed the page explosion after re-converting the epub to pdf with an external tool - uuurgh smile Thank you anyway! Great plugin.
  • Davo
    Tue, Jun 6, 2017, 5:36 PM
    Thanks for the update Wiebke - unfortunately HTML allows for some very complex scenarios (and browsers have had years of practice at outputting something sensible with even the most mangled of content) - the TCPDF library (which does the actual PDF generation) is never going to be able to cope with every possible scenario that could occur; we just have to rely on it coping with most scenarios in a reasonable way.
  • Wed, Jun 7, 2017, 3:41 PM
    I couldn't agree with Davo more. HTML always causes complex and unexpected scenarios. Specially, when copying content from MS Word to Moodle HTML editor, I strongly recommend using some sort of online tools like to clean the HTML first.
  • Mon, Jul 2, 2018, 1:19 AM
    Doesn’t work in 3.5
  • Davo
    Mon, Jul 2, 2018, 1:35 AM
    That's not the most helpful if descriptions - is there anything in particular that doesn't work in 3.5, is there an error message?
  • Miriam Fischer
    Thu, Aug 16, 2018, 4:13 PM
    Hi, is there a new release planned 3.4 / 3.5 onwards?
    Thanks you all for your great work so far!
1 2
Please login to post comments