Changes between Version 23 and Version 24 of TracWikiPrintPlugin


Ignore:
Timestamp:
Feb 22, 2010, 3:49:39 PM (5 years ago)
Author:
airadier
Comment:

Updating usage instructions

Legend:

Unmodified
Added
Removed
Modified
  • TracWikiPrintPlugin

    v23 v24  
    1212 * Syntax highlighting in exported format, using pygments
    1313 * Customizable front page for PDF book format
    14  * Automatic creation of Table of Contents if ![[PageOutline]] Macro is used
     14 * Automatic creation of Table of Contents if ![[PageOutline]] or ![[TOC]] Macro is used
    1515
    1616The style of the resulting PDF or HTML can be fully customized using CSS files.
     
    1818== News ==
    1919
     20 * '''2010-02-22: Version 1.8'''. Some fixes and improvements, see Recent Changes below.
     21 * ...
    2022 * '''2008-04-07: Version 1.1'''. Fix problems with images and attachments with no !wiki:PageName, now it should work.
    2123
     
    2426First, install the plugin as usual. There are several '''dependencies''':
    2527
    26  * [http://www.xhtml2pdf.com/ xhtml2pdf/PISA]: The python library used to convert HTML to PDF. You can install it with ''easy_install pisa''. The version supported by this plugin is 3.0.30. Others might work (3.0.29 is known to have a bug in TOC creation).
     28 * [http://www.xhtml2pdf.com/ xhtml2pdf/PISA]: The python library used to convert HTML to PDF. You can install it with ''easy_install pisa''. The version supported by this plugin is 3.0.32. Others might work (3.0.29 is known to have a bug in TOC creation).
    2729 * [http://www.reportlab.org/ ReportLab version 2.2]: This is a dependency of xhtml2pdf. If using easy_install, it should be automatically installed.
    2830 * [http://code.google.com/p/html5lib/ HTML5lib]: Same as previous.
     
    5759frontpage_url = c:/path/to/frontpage.html
    5860extracontent_url = c:/path/to/extracontent.html
     61
     62httpauth_user = wikiprint_user
     63httpauth_password = *password*
    5964}}}
    6065
     
    7681!WikiPrint exports the wiki format to HTML first, then converts the HTML to PDF using xhtml2pdf library. Links and image references in the wiki to html conversion are made as absolute URLS.
    7782
    78 In order to generate the PDF, ''xhtml2pdf'' library will try to download the images from their absolute URL (exactly as your web browser would do). The ''xhtml2pdf'' library is given a temporary cookie to authenticate in behave of the user, so the conversion process will have the same permissions as the user downloading the .pdf, but '''you must make sure that the project URL is accessible locally from the trac server itself'''. Also, per #6254, the server must not require HTTP authentication when connecting (Trac must be configured use the "login" link).
     83In order to generate the PDF, ''xhtml2pdf'' library will try to download the images from their absolute URL (exactly as your web browser would do).
    7984
    8085For example, if you access the trac project from your browser using the URL http://myserver/trac/myproject, but address of ''myserver'' is locally resolved at your workstation (via /etc/hosts or similar), and not globally known, then ''xhtml2pdf'' will fail to resolve ''myserver'' and won't be able to download the images from http://myserver/trac/myproject/. In that case, use the server IP instead.
    8186
     87'''Authentication and permissions'''
     88
     89When using cookie based authentication (like AccountManager), the ''xhtml2pdf'' library is given a temporary cookie to authenticate in behave of the user, so the conversion process will have the same permissions as the user downloading the .pdf, but '''you must make sure that the project URL is accessible locally from the trac server itself'''.
     90
     91Optionally, is HTTP Basic or Digest authentication is used, wikiprint can be configured to log in using '''httpauth_user''' and '''httpauth_password''' options.
     92
    8293=== Security Concerns ===
    8394
    84 When setting up header, footer, style, etc. the user can select a file from the file system and preview it. This could mean a security risk, as the user might display ''/etc/passwd'' or critical files. This is not a WikiPrint problem, as anyone with TRAC_ADMIN permissions would be able to install and run a potentially insecure plugin. So, make sure you trust users with TRAC_ADMIN permissions.
     95Wikiprint defines three new permissions:
     96
     97 * WIKIPRINT_ADMIN: Allow users to acces the ''Wikiprint Options'' admin page, and configure wikiprint options.
     98 * WIKIPRINT_BOOK: Allow users to access the ''Make Book'' admin page.
     99 * WIKIPRINT_FILESYSTEM: When setting up header, footer, style, etc. the user can enter a path to a file from the file system. In order for this to work, the user must have this ''WIKIPRINT_FILESYSTEM'' permission. Otherwise, this could mean a security risk, as the user might display ''/etc/passwd'' or critical files. This is not a WikiPrint problem, as anyone with TRAC_ADMIN permissions would be able to install and run a potentially insecure plugin. So, make sure you trust users with TRAC_ADMIN permissions, and you give WIKIPRINT_FILESYSTEM permission only to trusted users.
    85100
    86101=== Export formats ===