Extension:Pdf Export

Overview
Here is a simple special page you can add to do pdf export. It works with the open source htmldoc package. From a UI standpoint it plugs in just like SpecialCite.php, and appears as a link in the toolbox. When you click the link, the current page is rendered minus all the navigation stuff and written to a temp file. The temp file is passed through Htmldoc which sends the pdf back to the browser. The current version works with recent versions of MediaWiki, with a few tweaks it works with 1.6.7 and newer as well. On windows you'll need to make sure the paths are right, and have to properly construct the tmp directory. If you're having trouble with the images rendering, you may have to fiddle with how the pathnames get generated for them. In general the easy way to debug this extension is to comment out the line that removes the temp file. That way you can both check and hand-code the temp file, as well as manually run it through htmldoc to see what happens.

Installation
The only prerequisite is installing Htmldoc. Then save the source files as described below, add the following to your LocalSettings.php:

Source Code
Put the following into ./extensions/PdfExport/PdfExport.php : Then put the following into ./extensions/PdfExport/PdfExport.i18n.php :