Manual:How to use DjVu with MediaWiki


 * DjVu redirects here. This page explains how MediaWiki could work with DjVu. For help page on how to create a DjVu file from a PDF, see Creating a DjVu file

How that works ?

 * Manual:$wgDjvuDump - Path of the djvudump executable.
 * Manual:$wgDjvuOutputExtension - File extension for the DJVU post processor output.
 * Manual:$wgDjvuPostProcessor - Path of the DJVU post processor.
 * Manual:$wgDjvuRenderer - Path of the ddjvu DJVU renderer.
 * Manual:$wgDjvuToXML - Path of the djvutoxml executable.
 * Manual:$wgDjvuTxt - Path of the djvutxt executable.

How to install on GNU/Linux

 * Install DjVuLibre :
 * − Download the DjVuLibre package (which includes djvudump and ddjvu files). And, in the path :
 * ./configure
 * make
 * make install
 * − Or use aptitude or Synaptic in Debian derivatives
 * install netpbm package (use aptitude or Synaptic in Debian derivatives)
 * Finally, add (or modify) the code lines below in the LocalSettings.php file (not in the DefaultSettings.php):
 * For better thumbnails quality:

How to install on Win32
NOTES:
 * 1) Download the DjVuLibre software (which includes djvudump.exe and ddjvu.exe files).
 * 2) Install in "C:\DjVuLibre" (for example).
 * 3) Download the NetPbm complete package (which includes pnmtojpeg.exe, pnmtopng.exe, ... files).
 * 4) Install in "C:\GnuWin32\NetPbm"
 * 5) Add "C:\GnuWin32\NetPbm\bin" to the Windows PATH Environment Variable (and reboot the computer).
 * 6) Finally, add (or modify) the code lines below in the LocalSettings.php file (not in the DefaultSettings.php):
 * 7) * $wgFileExtensions[] = 'djvu';
 * 8) * $wgDjvuDump = 'C:/DjVuLibre/djvudump.exe';
 * 9) * $wgDjvuRenderer = 'C:/DjVuLibre/ddjvu.exe';
 * 10) * $wgDjvuTxt = 'C:/DjVuLibre/djvutxt.exe';
 * 11) * $wgDjvuPostProcessor = 'pnmtojpeg.exe';
 * 12) * $wgDjvuOutputExtension = 'jpg';
 * PHP needs memory to create thumbnails: this means a high memory_limit (~ 128MB) in the php.ini.

How to install on OS X
sudo port install netpbm
 * 1) Download the DjVuLibre package
 * 2) Copy the application DjView.app into your Applications directory.
 * 3) Install netpbm
 * 1) Follow last step of install on GNU/Linux

Next to do

 * How to install DjVuLibre, Qt and netpbm on a server.

Problems and solutions

 * If you got «Error creating thumbnail: terminate called after throwing an instance of 'DJVU::GException' ppmtojpeg: EOF / read error reading magic number» when view file, increase the $wgMaxShellMemory.
 * Thumbnails of DjVu-file with non-Latin name are absent in a namespace Page. If you use extension WebStore in your own wiki, then in file $IP/extensions/WebStore/404-handler.php replace next string:
 * by
 * by

Other page

 * Extension:Proofread Page
 * Extension:PdfHandler
 * Extension:PagedTiffHandler