Wikipdf install

From Teknologisk videncenter
Jump to: navigation, search

This files describes the installation of WikiPDF, either on Linux or Windows, along with its dependencies.


Dependencies

It is assumed that you have already mediawiki installed and thus a recent version of Apache and PHP running.

The dependencies specifically needed by WikiPDF are the following.


Imagemagick

For image conversion. Installation under windows through the visual installer (http://www.imagemagick.org) and under linux with your favorite package manager, e.g. using apt:

apt-get install imagemagick


Latex

For the Latex to PDF conversion, the pdflatex command is needed.

On Windows, download and install MikTex.

On Linux, install tetex:

apt-get install tetex


Python

On windows, download and install the python interpreter from http://www.python.org/download/

On linux, python should normally already be installed. If not, you can install it with your favorite package manager, e.g. for apt:

apt-get install python


WikiPDF Installation

WikiPDF is a Mediawiki extension. Unpack it on the extensions directory of your mediawiki installation. Add the folowing to the end of your LocalSettings.php:

--- $wgWikiURL = "<put here the URL that you want to see in the PDF>"; $wgPDFMessage = "<message you want to see in the header of the PDF>"; $wgLaTeXTemplate = "<put here the name of the template you want to use.>";

require_once( "extensions/wikipdf/wikipdf.php" ); ---

Templates available in this package are: "article", "minimal" and "twocolumn".

Each of these templates will give you a different formatting on your PDF


Variables Explanation

  • $wgWikiURL is the URL to your wiki ( $wgWikiURL = "http://aluno.no-ip.info/juca" in the case on my wiki). It will be used in the links for other articles of your wiki that will appear in the PDF.
  • $wgPDFMessage is the message that will appear in the header of the PDF created

There are some other optional variables. Take a look at http://aluno.no-ip.info/juca/index.php/WikiPDF (fixme: links broken)


Tested Configuration

WikiPDF has been sucessfully tested on various Linux and Windows systems including Ubuntu Dapper and Windows Server 2003.


Troubleshooting

If there is a problem during PDF generation, first check the 'error log w2latex' logs to see if there has been a problem during Latex code generation. There might be a problem with a special wiki page which format is legal but not yet supported by WikiPDF.

If no problem was detected during the last step, you can check the pdflatex logs, to see if there was a problem during PDF generation (An image might be missing or an illegal formatting element in the document, see below, might be the cause). Another problem might be that there is a latex package missing (not included with your latex installation). You can either install it for your latex distribution or simply put the corresponding file (which name appears in pdflatex logs) in the latex folder within wikipdf.


Problematic Formatting

The following formatting elements are known to make problems to WikiPDF:

  • Nested tables
  • Numbered or bullet lists within a table cell
  • Code block (line(s) starting with a space) within a table cell


Please, report bugs to

  • felipe.sanches@gmail.com
  • pajai@extrabright.com


PJ / 2007