wiki:TracWikiToPdfPlugin

Version 23 (modified by Diorgenes Felipe Grzesiuk, 9 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 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 }}})

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 [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.

Ticket Summary Owner Type Status Priority Severity
#3218 save selection somehow (like saving reports/queries is possible) Diorgenes Felipe Grzesiuk enhancement closed normal normal
#3278 Doesn't work with 0.11rc2 Diorgenes Felipe Grzesiuk defect closed normal blocker
#3337 0 bytes PDFs on 0.11 Diorgenes Felipe Grzesiuk defect reopened normal critical
#3366 Issues with egg in 0.11 branch and creating egg Diorgenes Felipe Grzesiuk defect closed normal normal
#3404 Images broken for single page PDF's Diorgenes Felipe Grzesiuk defect closed normal major
#3405 colors from tables and code sections not maintained Diorgenes Felipe Grzesiuk enhancement closed normal normal
#3427 Intra-wiki links treated as local OS links by Acrobat Reader Diorgenes Felipe Grzesiuk defect closed normal normal
#3429 Disable border on images Diorgenes Felipe Grzesiuk enhancement closed low trivial
#3465 'NoneType' object has no attribute 'endswith' Diorgenes Felipe Grzesiuk defect reopened normal normal
#3481 Some cleaning and fixing Diorgenes Felipe Grzesiuk defect closed normal normal
#3493 Support for downloading dynamic images through the webserver Nickolas Grigoriadis enhancement closed normal normal
#3590 Error: Macro Image(foo.png) failed Diorgenes Felipe Grzesiuk defect closed normal major
#3599 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 219: ordinal not in range(128) Diorgenes Felipe Grzesiuk defect closed normal normal
#3779 No PDF Export - Problem with template_path - probable reason found Diorgenes Felipe Grzesiuk defect new normal normal
#3908 character from non latin symbols show like ??????? Svetlozar Bakalov defect closed normal normal
#4043 Linked images in PDF don't work properly Diorgenes Felipe Grzesiuk defect new high major
#4198 incorrect or missing output for code snippets & formulas Diorgenes Felipe Grzesiuk defect closed normal major
#4283 If code block is larger than page left alignment is more readable than a centered one. Diorgenes Felipe Grzesiuk enhancement new normal normal
#4304 Trac crashes when trying to export pages containing attachments Diorgenes Felipe Grzesiuk defect new normal normal
#4316 take all pages with a certain tag Diorgenes Felipe Grzesiuk enhancement new normal normal
#4345 optionally skip toc macro when not inline Diorgenes Felipe Grzesiuk enhancement closed normal normal
#4543 Admin reports error Diorgenes Felipe Grzesiuk defect closed normal normal
#4616 Simplify the creation of multi-page documents Nickolas Grigoriadis enhancement assigned high normal
#4634 runnable Egg for Python 2.5 Diorgenes Felipe Grzesiuk defect closed normal normal
#4689 Please add support for the ScreenshotsPlugin Diorgenes Felipe Grzesiuk enhancement new normal normal
#4690 page breaks: paragraph/headings handling etc. Nickolas Grigoriadis enhancement assigned normal normal
#4696 Cover page issues Diorgenes Felipe Grzesiuk defect closed normal normal
#4747 Missing PS and HTML export Diorgenes Felipe Grzesiuk enhancement closed normal normal
#4834 Getting Write access to TracWikiToPdfPlugin Diorgenes Felipe Grzesiuk task closed normal normal
#4915 Language-specific cover pages Diorgenes Felipe Grzesiuk enhancement new normal normal
#4977 Admin can't add pages to PDF book on IE8 Diorgenes Felipe Grzesiuk defect closed normal normal
#5163 htmldoc needs --jpeg to create usable size pdfs Diorgenes Felipe Grzesiuk defect new normal normal
#5201 Missing __init___.py Diorgenes Felipe Grzesiuk defect closed normal normal
#5311 PDF not exporting images inserted using HTML markup Diorgenes Felipe Grzesiuk defect new normal normal
#5442 Image Download don't work if linked to source instead of wiki Diorgenes Felipe Grzesiuk defect new normal normal
#5453 Image filenames cannot contain whitespace Ryan J Ollos defect new high normal
#5490 Create a PDF from a Report and Ticket(s) Diorgenes Felipe Grzesiuk enhancement new normal normal
#5854 format=raw stripped by wikitopdf.py breaking source: URLs in wiki Image links Diorgenes Felipe Grzesiuk defect new normal normal
#5855 set width="100%" height="100%" on images Diorgenes Felipe Grzesiuk defect new normal normal
#5856 Image() URLs fail due to lack of ATTACHMENT_VIEW permissions, crashes WikiToPDF Diorgenes Felipe Grzesiuk defect new highest critical
#5864 Pages without titles (such as =TitleName=) cause the generation of a 0 byte PDF in multi-page PDFs Diorgenes Felipe Grzesiuk defect new normal normal
#5883 UTF-8 wiki pages don't work Ryan J Ollos defect closed high critical
#5915 Cells (e.g. in tables) get messed up Diorgenes Felipe Grzesiuk defect new normal normal
#6182 unable to export static image in pdf (dynamic image works) Diorgenes Felipe Grzesiuk defect closed normal normal
#6243 Switch from ClearSilver to Genshi Jun Omae task closed high blocker
#6588 Option to append wiki page source, date/time, and revision info Diorgenes Felipe Grzesiuk enhancement new normal normal
#6604 Include version info for HTMLDOC in System Information on About page Ryan J Ollos enhancement closed high normal
#6705 Support fetching images from https with certificate file Diorgenes Felipe Grzesiuk enhancement new normal normal
#6966 PDF creation does not work if image macro has no absolute links in it Diorgenes Felipe Grzesiuk defect closed normal normal
#7028 System-wide installation doesn't work Ryan J Ollos defect closed high normal
#7072 Migration to trac 0.12? Ryan J Ollos enhancement closed normal normal
#7081 encoding problem Diorgenes Felipe Grzesiuk defect closed normal normal
#7199 Get a "You're using a plugin which requires the Clearsilver template engine and Clearsilver is not installed." when using WikiToPdf Diorgenes Felipe Grzesiuk defect closed normal normal
#9174 Option to put PageTitle at top of pdf for wikitopdf single page Diorgenes Felipe Grzesiuk defect new normal normal
#10102 Question concerning "base_dir" parameter Diorgenes Felipe Grzesiuk enhancement closed normal major
#10103 Question concerning "base_dir" parameter Ryan J Ollos enhancement closed normal major
#10491 error on trac 1.0 Diorgenes Felipe Grzesiuk defect closed normal normal
#10783 Images not include in PDF Diorgenes Felipe Grzesiuk defect closed high blocker
#10836 "AttributeError: hdf" when trying to access wikitopdf admin panel Diorgenes Felipe Grzesiuk defect closed normal blocker
#11359 Plugin works on ClearSilver, Trac now uses Genshi Diorgenes Felipe Grzesiuk enhancement closed normal normal
#11859 [PATCH] Fix plugin for Trac >= v1.0 enhancement new normal blocker
#12758 Error saying "HTMLDOC is not installed" even though it is Diorgenes Felipe Grzesiuk defect closed normal normal
#13020 Add support for Trac 1.2 Diorgenes Felipe Grzesiuk enhancement closed normal normal
#13213 Dynamic images generation failing to infinit loop pavel.prech@… defect closed normal normal
#13266 No error logged when htmldoc not installed Ryan J Ollos defect closed normal normal

If you have any issues, create a new ticket.

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.

(more)

Author/Contributors

Author: Diorgenes Felipe Grzesiuk

Contributors:

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

Attachments (2)

Download all attachments as: .zip