wiki:TracWikiToPdfPlugin/Doc0.11

Version 4 (modified by Ryan J Ollos, 7 years ago) (diff)

CombineWikiPlugin has been removed.

0.11 Manual

For now, only those users with the WIKI_ADMIN permission can combine wiki pages on one 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#.

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)]]
  • Code blocks ({{{ code }}})

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

CSS Support

You can get Syntax highlighting when using the experimental HTMLDoc 1.9.

Note that htmldoc version htmldoc-1.9.x-r1586 has broken headers/footers, however version htmldoc-1.9.x-r1563 works fine.

You only need the unstable 1.9 version if you want syntax highlighting and/or css support:

[wikitopdf]
css_file = /var/lib/trac/IS/conf/htmldoc.css

Support for Dynamic images

If you want TracWikiToPdfPlugin to handle dynamically generated images, or images done by another plugin you need to configure this in the trac.ini file:

[wikitopdf]
tmp_dir = /tmp/wikitopdf
trac_uri = http://trac.blah.is.co.za

More information is available at #3493.

Example

Configurations WikiToPDF in the trac.ini file:

[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.
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
# jpeg = 90 # only add when the PDF's generated are too large

[wikitopdf-page]
# HTMLDOC options.
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
# jpeg = 90 # only add when the PDF's generated are too large