Howto get a PDF from a MediaWiki

Abstract

The following document ought enable the reader to setup a PDF (and other Formats) export to his MediaWiki.

Necessary Preparations

You have already running:

  • MediaWiki version 1.11 or later
  • cURL for PHP.
  • decide what kind of render server you want to use (see "Which Render Server is The Right For Me ?")
  • (optional) mwlib (see "Setup A Own Render Server")

Which Render Server is The Right For Me ?

Behind the Collection Extension frontend works a render server, who creates the PDF. The public PediaPress Tool Server provides a render service for low traffic wikis. This is a very comfortable way, but it has some restrictions:

  • your wiki must running on a server, witch is accessible for tools.pediapress.com (85.214.135.240).
    Maybe you must review your firewall / DNS configuration.
    (Hint: something like 'http://hdep/' or 'http://192.168.4.21' or 'http://localhost/wiki', is not accessible for our render server.)
  • you can't customize the layout of the generated PDF-documents (see mwlib.rl for the options of customize the output).

If those restrictions do affect you, see "Setup A Own Render Server" below.

Setup the Collection Extension

Hint: If you recently installed cURL, make sure that the modul is loaded by apache2.
Maybe you must restart the apache2 process. If you not sure, use phpinfo() to get surety.

First make sure that you have read the README of the Collection Extension.
The essential steps are this:

  • verify that cURL is enabled
  • checkout the Collection Extension from SVN (see README)
  • patch the LocalSettings.php
  • configure the $wgCollection*-variables those affect you (see README)

Verify The Successful Setup

Setup A Own Render Server

To run a own render server is very flexible and easy to setup. You only need to install mwlib, and then setup mwlib.rl.

After that, you must start mw-serve and adjust $wgCollectionMWServeURL to your local domain.
The default if running mw-serve and the web server on the same machine) is "http://localhost:8899".

Troubleshooting

  • <some common mistakes here>

Please report troubles in the mailing list. Before precipitate mailing, please do a short search.
Also provide a meaningful description of your problem, including e.g. the version number of the involved software components and additional information to solve your problem.