You are here: System » GenPDFPrincePlugin


This plugin generates PDF using the third-party tool Prince XML. You will have to download this tool from their site and agree on the license terms and conditions. Note that the non-commercial version can be used on a Foswiki server for free. In this case you will get a watermark at the top right corner of the generated pdf although not visible when printed out.


In case you'd like to use Prince XML for commercial purposes or just want to get rid of this watermark, contact MD Consulting to purchase a server license with a specific sales discount granted to Foswiki users.


Get a PDF by adding contenttype=application/pdf to the view url like this:

Optionally an url parameter outfile can be used to specifiy the target filename of the pdf being generated. If not specified explicitly it defaults to genpdf_%!TOPIC%.pdf


Here's the complete Foswiki documentation in PDF.


You will have to download Prince XML from

If you are using other plugins that implement a completePageHandler (see InstalledPlugins) then you most probably need to tune the $Foswiki::cfg{PluginsOrder} to list the GenPDFPrincePlugin behind those. For example, if you are using Foswiki:Extensions/ZonePlugin then you will have to list both giving them a specific order how they execute the completePageHandler

$Foswiki::cfg{PluginsOrder} = '...., ZonePlugin, GenPDFPrincePlugin';

Note, that ZonePlugin is not required anymore in newer Foswiki engines > 1.1.0.

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See for more help.

Plugin Info

Author: Foswiki:Main.MichaelDaum
Copyright: © 2009-2014, Michael Daum
License: GPL (GNU General Public License)
Release: 1.60
Version: 1.60
Change History:  
16 Dec 2014 work around call to unofficial internal api to get absolute pub urls
18 Mar 2014 fixed encoding content again; setting static context when delivering pdf output
18 Mar 2013 added outfile url param to specify the file name of the pdf being generated
08 Mar 2012 fixed encoding of charset fed to prince xml; rewrite img urls from http: to file: urls while prince works on the local filesystem generating pdf
17 Nov 2010 using legacy interface mkpath to make_path to please older perl versions
11 Nov 2010 fixing incomplete image data in pdf
07 Jun 2010 added content-disposition to ease saving the pdf to disk
20 Aug 2009 improved error handling
07 May 2009 initial release
Home: Foswiki:Extensions/GenPDFPrincePlugin
Support: Foswiki:Support/GenPDFPrincePlugin
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding NCSS Leaders-Board? Send feedback