Version 14 (modified by anonymous, 10 years ago) (diff)


Trac WikiToPDF


WikiToPdf was developed based on the work of coderanger and athomas. WikiToPdf combines the functionality of CombineWikiPlugin and PageToPdfPlugin on only one plugin and allows one to setup a template file used to generate the PDF file with a cover and a licence page, for example.

At the end of each wiki page there is a link named WikiToPdf and works like athomas PageToPdfPlugin plugin but takes into account the parameters on trac.ini (see bellow) and passes them to htmldoc.

Alternatively, it's possible to select one or more wiki pages and generate one single PDF file just like coderanger work with a cover and a licence from a template file. This feature also takes into account the parameters on trac.ini.

For now, only those users with WIKI_ADMIN permission can combine wiki pages on one single file. It's possible to define values to title, subtitle, file version and date that are used on the PDF file.

WikiToPdf also adds support to some wiki formatting that didn't work with CombineWikiPlugin neither PageToPdfPlugin:

 - Tables (||Table||)
 - Images ([[Image(wiki:Page:image.png, 100%)]])
 - Code blocks ({{{ code }}})


To use WikitoPdf plugin you need to install Htmldoc (


Combining wiki pages:

Single page:

Bugs/Feature Requests

Existing bugs and feature requests for TracWikiToPdfPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:tracwikitopdfplugin here].


You can check out TracWikiToPdfPlugin from here using Subversion, or browse the source with Trac.


Configurations WikiToPDF in file trac.ini, more information about HTMLDOC (

wikitopdf.* = enabled

# base_dir is the Apache DocumentRoot, It is need to get PDF files with images.
base_dir = /path/to/DocumentRoot

# titlefile is Html file used to get a cover.
titlefile = /path/to/cover.html

# HTMLDOC options. See the link above.
size = A4
right = 1.5cm
left = 1.5cm
top = 1.5cm
bottom = 1.5cm
no-links = None
toctitle = Sumary
numbered = None
linkstyle = plain
header = l
footer = .r1
logoimage = /path/to/header-logo.png

size = A4
right = 1.5cm
left = 1.5cm
top = 1.5cm
bottom = 1.5cm
no-links = None
linkstyle = plain
header = l
footer = .r1
logoimage = /path/to/header-logo.png

Recent Changes

16787 by rjollos on 2017-09-06 21:37:20
TracWikiToPdfPlugin 3.0.0dev: Use subprocess for better error handling

Fixes #13266.

16786 by rjollos on 2017-09-06 20:56:21
TracWikiToPdfPlugin 3.0.0dev: Add charset option for wikitopdf

Fixes #5883.

16785 by rjollos on 2017-09-06 20:42:45
TracWikiToPdfPlugin 3.0.0dev: Fix inclusion of images

The base_dir configuration parameter has been eliminated
and images should be included without any special configuration.

Fixes #10103.



Author: Diorgenes Felipe Grzesiuk


  • Edney Matias da Silva (edney@…)
  • Holger Lehmann (holger.lehmann@…)

Attachments (2)

Download all attachments as: .zip