Trac WikiToPDF

Description

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)]])  Attention - don't use this format [[Image(image.png)]]
 - Code blocks ({{{ code }}})

Prerequisites

To use WikitoPdf plugin you need to install Htmldoc (http://www.htmldoc.org).

Screenshots

Combining wiki pages:

http://trac-hacks.org/browser/tracwikitopdfplugin/0.11/docs/example-documentation.pdf?format=raw

Single page:

http://trac-hacks.org/browser/tracwikitopdfplugin/0.11/docs/example-howto.pdf?format=raw

Example

Configurations WikiToPDF in file trac.ini, more information about HTMLDOC (http://www.htmldoc.org/htmldoc.html#CMDREF)

[components]
wikitopdf.* = enabled

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

# path to folder used to get a cover files.
pathtocover = /path/to/cover

# this are parameters functionality PDF links
link = http://servername/trac-project
folder_name = trac-project

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

[wikitopdf-page]
# HTMLDOC options. See the link above.
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

Download and Source

Download the zipped source, check out using Subversion, or browse the source with Trac.

Bugs/Feature Requests

Existing bugs and feature requests for TracWikiToPdfPlugin are here.

#3218
save selection somehow (like saving reports/queries is possible)
#3278
Doesn't work with 0.11rc2
#3337
0 bytes PDFs on 0.11
#3366
Issues with egg in 0.11 branch and creating egg
#3404
Images broken for single page PDF's
#3405
colors from tables and code sections not maintained
#3427
Intra-wiki links treated as local OS links by Acrobat Reader
#3429
Disable border on images
#3465
'NoneType' object has no attribute 'endswith'
#3481
Some cleaning and fixing
#3493
Support for downloading dynamic images through the webserver
#3590
Error: Macro Image(foo.png) failed
#3599
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 219: ordinal not in range(128)
#3779
No PDF Export - Problem with template_path

If you have any issues, create a new ticket.

Recent Changes

[4224] by diorgenes on 09/02/08 10:47:37

#3465

[4191] by diorgenes on 08/27/08 11:07:12

The correction by tickets #3465

[4190] by diorgenes on 08/27/08 07:18:00

The correction by tickets #3465

[4181] by diorgenes on 08/25/08 13:49:07

New codification corrections... by #3599 #3465

Author/Contributors

Author: Diorgenes Felipe Grzesiuk

Contributors:

  • Edney Matias da Silva (edney@prognus.com.br)
  • Holger Lehmann (holger.lehmann@catworkx.de)
  • Jcole (jcole@carinatek.com)

Attachments