wiki:TracWikiToPdfPlugin

Version 8 (modified by diorgenes, 7 years ago) (diff)

--

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 Coderangers 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 }}})

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.10/docs/example-documentation.pdf?format=raw

Single page:

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

Bugs/Feature Requests

Existing bugs and feature requests for TracWikiToPdfPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

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

Example

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

[wikitopdf]
base_dir = /path/to/DocumentRoot
titlefile = /path/to/cover.html

[wikitopdf-admin]
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

[wikitopdf-page]
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

[13441] by jun66j5 on 2013-11-22 14:36:42
TracWikiToPdfPlugin: ported to genshi template from clearsilver (fixed #6243)
[11777] by rjollos on 2012-07-25 09:46:39
Added setup.cfg.
[11507] by rjollos on 2012-04-20 06:07:48

Refs #4043, #6243:

  • Removed some needed imports in [11469].
  • When wiki page is created from the Admin panel, the page variables in not passed as a argument in the request. We'll have to find some other way to get it.

Author/Contributors

Author: diorgenes
Contributors:

Attachments (2)

Download all attachments as: .zip