Changes between Version 23 and Version 24 of TracWikiPrintPlugin
- Timestamp:
- Feb 22, 2010, 2:49:39 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracWikiPrintPlugin
v23 v24 12 12 * Syntax highlighting in exported format, using pygments 13 13 * Customizable front page for PDF book format 14 * Automatic creation of Table of Contents if ![[PageOutline]] Macro is used14 * Automatic creation of Table of Contents if ![[PageOutline]] or ![[TOC]] Macro is used 15 15 16 16 The style of the resulting PDF or HTML can be fully customized using CSS files. … … 18 18 == News == 19 19 20 * '''2010-02-22: Version 1.8'''. Some fixes and improvements, see Recent Changes below. 21 * ... 20 22 * '''2008-04-07: Version 1.1'''. Fix problems with images and attachments with no !wiki:PageName, now it should work. 21 23 … … 24 26 First, install the plugin as usual. There are several '''dependencies''': 25 27 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.3 0. 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). 27 29 * [http://www.reportlab.org/ ReportLab version 2.2]: This is a dependency of xhtml2pdf. If using easy_install, it should be automatically installed. 28 30 * [http://code.google.com/p/html5lib/ HTML5lib]: Same as previous. … … 57 59 frontpage_url = c:/path/to/frontpage.html 58 60 extracontent_url = c:/path/to/extracontent.html 61 62 httpauth_user = wikiprint_user 63 httpauth_password = *password* 59 64 }}} 60 65 … … 76 81 !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. 77 82 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).83 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). 79 84 80 85 For 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. 81 86 87 '''Authentication and permissions''' 88 89 When 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 91 Optionally, is HTTP Basic or Digest authentication is used, wikiprint can be configured to log in using '''httpauth_user''' and '''httpauth_password''' options. 92 82 93 === Security Concerns === 83 94 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. 95 Wikiprint 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. 85 100 86 101 === Export formats ===