Create PDFs from wiki pages


This plugin allows you to set up a template file to generate a PDF file with a cover and a license page, for example. At the end of each wiki page there is a link named WikiToPdf and takes into account the parameters in your trac.ini file and passes them to htmldoc. See below for some examples.

Alternatively, it's possible to select one or more wiki pages and generate one single PDF file. This feature also takes into account the parameters in trac.ini.

For now, only those users with the WIKI_ADMIN permission can combine wiki pages on one single file. It is possible to define values to title, subtitle, file version and date that are used on the PDF file. The placeholders in the HTML file must be #TITLE#, #SUBJECT#, #VERSAO# and #DATA#.

WikiToPdf also adds support to some wiki formatting:

 - Tables (||Table||)
 - Images ([[Image(wiki:Page:image.png)]])  Attention - don't use this format [[Image(image.png)]], although this may be okay following [11471], please report in #4043 whether this works for you now.
 - Code blocks ({{{ code }}})

Note: If you want to use a cover file, it must be encoded in Latin-1 (ISO-8859-1), otherwise the plugin will fail to use it!

This plugin was developed based on the work of coderanger and athomas. It combines the functionality of CombineWikiPlugin and PageToPdfPlugin, both of which are deprecated. See also TracWikiPrintPlugin.

Bugs/Feature Requests

Existing bugs and feature requests for TracWikiToPdfPlugin are here.

If you have any issues, create a new ticket.


23 / 39


10 / 21


2 / 2


Download the zipped source.


Check out using Subversion, or browse the source with Trac.


To use WikitoPdf plugin you need to install Htmldoc, which itself is GPL-licensed.

Further general instructions on installing Trac plugins can be found on the TracPlugins page.


Combining wiki pages:


Single page:



Recent Changes

15542 by rjollos on 2016-05-03 23:50:12
2.3.3dev: Reverse merge [15534] on 0.11 branch

Fixes #6604.

15541 by rjollos on 2016-05-03 23:49:36
3.0.0dev: Return error message when HTMLDOC version read fails

Refs #6604.

15540 by rjollos on 2016-05-03 23:46:18
3.0.0dev: Replace tabs with spaces in template


Author: Diorgenes Felipe Grzesiuk
Maintainer: Diorgenes Felipe Grzesiuk

Last modified 7 months ago Last modified on Oct 22, 2015, 3:11:12 PM

Attachments (2)

Download all attachments as: .zip