Version 31 (modified by 15 years ago) (diff) | ,
---|
Trac WikiToPDF
Notice: This plugin is unmaintained and available for adoption.
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 below) 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 (the placeholders in the HTML file must be #TITLE#, #SUBJECT#, #VERSAO# and #DATA#).
NEW: Patch #4616 supports the definition of a document on a wiki page - there is no need any more to enter a title and select all pages each time you want to create a PDF. And better even - any user can do it. The patch is for the Trac 0.10 version of the plugin: just replace the wikitopdf.py with the patched one in #4616 (mvlcek).
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 }}})
ATTENTION: If you want to use a cover file, take care it is encoded in Latin-1 (ISO-8859-1) - otherwise the plugin will fail to use it!
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. (key corrected from pathtocover to titlefile) titlefile = /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 [download:tracwikitopdfplugin zipped source], check out using Subversion, or browse the source with Trac.
Bugs/Feature Requests
Existing bugs and feature requests for TracWikiToPdfPlugin are here.
If you have any issues, create a new ticket.
Recent Changes
- 17423 by rjollos on 2019-07-30 16:41:28
-
TracWikiToPdfPlugin 3.0.0dev: Improve debug logging
Refs #13568.
- 17341 by rjollos on 2019-02-19 03:30:48
-
TracWikiToPdfPlugin 3.0.0dev: Fix failure of r17340 with subpages
Refs #5856.
- 17340 by rjollos on 2019-02-18 02:02:15
-
TracWikiToPdfPlugin 3.0.0dev: Fix failure retrieving images
Retrieving images would fail when anonymous lacked
WIKI_VIEW.
Fixes #5856.
(more)
Author/Contributors
Author: Diorgenes Felipe Grzesiuk
Contributors:
- Edney Matias da Silva (edney@…)
- Holger Lehmann (holger.lehmann@…)
- Jcole (jcole@…)
Attachments (2)
- wikitopdf-page.png (116.1 KB) - added by 16 years ago.
- wikitopdf-admin.png (68.7 KB) - added by 16 years ago.
Download all attachments as: .zip