Changes between Version 41 and Version 42 of TracWikiPrintPlugin


Ignore:
Timestamp:
Aug 20, 2015, 9:48:03 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracWikiPrintPlugin

    v41 v42  
    1818Existing bugs and feature requests for TracWikiPrintPlugin are [report:9?COMPONENT=TracWikiPrintPlugin here].
    1919
    20 If you have any issues, create a  [http://trac-hacks.org/newticket?component=TracWikiPrintPlugin&owner=airadier new ticket].
     20If you have any issues, create a [/newticket?component=TracWikiPrintPlugin new ticket].
    2121
    2222[[TicketQuery(component=TracWikiPrintPlugin&group=type,format=progress)]]
     
    2424== Download
    2525
    26 Download the zipped source from [download:tracwikiprintplugin here]. In addition to official Debian packages, there is an  [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935-0.1_all.deb unofficial Debian package]  (with [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935.orig.tar.gz src],  [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935-0.1.dsc dsc], and [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935-0.1.debian.tar.gz debian changes]).
     26Download the zipped source from [download:tracwikiprintplugin here]. In addition to official Debian packages, there is an [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935-0.1_all.deb unofficial Debian package] (with [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935.orig.tar.gz src], [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935-0.1.dsc dsc], and [http://dl.dropbox.com/u/4213259/deb/trac-wikiprint_1.8.4%2Br7935-0.1.debian.tar.gz debian changes]).
    2727
    2828== Source
     
    3232=== Patches
    3333
    34 If you are running Windows & IIS and you should need to access resources locally and not via web browser (images, fonts), you may try the #9854 hotfix. Now in testing, please keep the ticket updated with results in order to release this.
     34If you are running Windows & IIS and you need to access resources locally and not via web browser (images, fonts), you may try the #9854 hotfix. Now in testing, please keep the ticket updated with results in order to release this.
    3535
    3636== Installation
     
    3838There are several '''dependencies''':
    3939
    40  * [http://www.xhtml2pdf.com/ xhtml2pdf] and [http://pypi.python.org/pypi/pisa 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).
     40 * [http://www.xhtml2pdf.com/ xhtml2pdf] and [pypi:pisa 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).
    4141 * [http://www.reportlab.org/ ReportLab version 2.2]: This is a dependency of xhtml2pdf. If using easy_install, it should be automatically installed.
    4242 * [http://code.google.com/p/html5lib/ HTML5lib]: Same as previous.
    4343 * [http://pybrary.net/pyPdf/ pyPDF]: Same as previous.
    44  * [http://www.pythonware.com/products/pil/ PIL (Python Imaging Library)]: I'm not sure if this is a dependency of xhtml2pdf, but anyways, ''easy_install PIL'' should do the work.
    45  * [http://pygments.org/ Pygments]: Python syntax highlighter. You need this for syntax highlighting in Trac, too.
     44 * [http://www.pythonware.com/products/pil/ PIL] (Python Imaging Library): I'm not sure if this is a dependency of xhtml2pdf, but anyways, ''easy_install PIL'' should do the work.
     45 * [http://pygments.org/ Pygments]: Python syntax highlighter. You need this for syntax highlighting in Trac too.
    4646
    4747To install dependencies (PIL/!!ReportLab/HTML5Lib/Pygments/pyPDF):
     
    5050   * `aptitude install python-imaging python-reportlab python-html5lib python-pygments python-pypdf`
    5151 * On Fedora/Redhat:
    52    * `yum install  python-imaging python-reportlab python-html5lib python-pygments pyPdf`
     52   * `yum install python-imaging python-reportlab python-html5lib python-pygments pyPdf`
    5353
    5454To install plugin:
     
    6363wikiprint.* = enabled
    6464}}}
     65
    6566After enabled, two new administrative panels will be available under the '''Wikiprint''' section, and 3 new formats will be available in the ''Download in other formats'' section at the end of the wiki page:
    6667
     
    6970 * Printable HTML
    7071
    71 == Settings
     72== Configuration
    7273
    7374If you're behind a '''proxy''', add something like this to your .wsgi file so '''remote''' resources can be downloaded when creating pdfs:
     
    9192...
    9293}}}
     94
    9395Additional options can be set by creating a ''wikiprint'' section in your `trac.ini` file:
    9496
     
    118120!WikiPrint allows customization of documents by three different options:
    119121
    120  * '''css_url''':  A path or URL to a file with CSS styles that will be applied to the  exported output. If left blank, a default CSS is used. If you are  creating a custom CSS, use the default CSS as start, and change as  needed. Some tweaking is needed in order to make xhtml2pdf/PISA library generate PDF correctly.
     122 * '''css_url''': A path or URL to a file with CSS styles that will be applied to the exported output. If left blank, a default CSS is used. If you are creating a custom CSS, use the default CSS as start, and change as needed. Some tweaking is needed in order to make xhtml2pdf/PISA library generate PDF correctly.
    121123 * '''article_css_url''': A path or URL to a file with CSS styles that will be used only when exporting to '''PDF Article''' format. The default one defines the page margins, and creates ''header'' and ''footer'' frames, which contents will be defined in the ''extracontent_url'' file.
    122124 * '''book_css_url''': A path or URL to a file with CSS styles that will be used only when exporting to '''PDF Book''' format. The default one defines the default page with no header or footer, which will be used for the front page, and a ''standard'' templage page, which will be used for successive pages, with header and footer.
    123125
    124 For more information about the styles that affect the PDF output, see the [attachment:"pisa-en.pdf" xhtml2pdf  manual].
     126For more information about the styles that affect the PDF output, see the [attachment:"pisa-en.pdf" xhtml2pdf manual].
    125127
    126128=== Customizing front page, header, footer, contents
    127129
    128  * '''frontpage_url''':  A path or URL to a file with HTML ('''It doesn't have to be a well formed xhtml document, so don't include begin/end tags, body, etc., see the default one'''), that will be used as the front page when exporting to ''PDF Book''. Some special tags can be used to insert the title, version, date, etc. See ''Tag Replacement''
     130 * '''frontpage_url''': A path or URL to a file with HTML ('''It doesn't have to be a well formed xhtml document, so don't include begin/end tags, body, etc., see the default one'''), that will be used as the front page when exporting to ''PDF Book''. Some special tags can be used to insert the title, version, date, etc. See ''Tag Replacement''
    129131 * '''extracontent_url''': A path or URL to a file with HTML that will be inserted at the beginning of the document before passing it to to ''xhtml2pdf''. This should be used to define the contents of the '''header''' and '''footer'''. See xhtml2html documentation, and the default article CSS contents and default extra contents for an example.
    130132
    131133=== Authentication
    132134
    133 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'''.
     135When 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'''.
    134136
    135137Optionally, is HTTP Basic or Digest authentication is used, wikiprint can be configured to log in using '''httpauth_user''' and '''httpauth_password''' options.
     
    137139Not available in administrative interface yet:
    138140
    139  * '''rebase_links''':  When generating PDF or printable HTML, change the base URL to the base  URL specified with this option. Useful for changing local references (something like "http://localhost:8080") to a global address (like http://mycompany.com/trac).
     141 * '''rebase_links''': When generating PDF or printable HTML, change the base URL to the base URL specified with this option. Useful for changing local references (something like "http://localhost:8080") to a global address (like http://mycompany.com/trac).
    140142 * '''omit_links''': Remove internal wiki links from generated PDFs.
    141  * '''omit_macros''':  A comma separated list of macro names that will be omited when  converting the wiki document to the selected output (PDF or printable HTML).
     143 * '''omit_macros''': A comma separated list of macro names that will be omited when converting the wiki document to the selected output (PDF or printable HTML).
    142144
    143145== Permissions
     
    147149 * WIKIPRINT_ADMIN: Allow users to acces the ''Wikiprint Options'' admin page, and configure wikiprint options.
    148150 * WIKIPRINT_BOOK: Allow users to access the ''Make Book'' admin page.
    149  * 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.
     151 * WIKIPRINT_FILESYSTEM: When setting up header, footer, style, etc. the user can enter a path to a file from the file system. 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 give WIKIPRINT_FILESYSTEM permission only to trusted users.
    150152
    151153== Exporting and formats
     
    163165=== PDF Book
    164166
    165 This format will create a book-like PDF document. A front page that  can show  title, subject, date and version is inserted at the beginning  of the document. A 'Table of Contents' is also inserted after the front page. Any further ocurrences of ![[PageOutline]] will be removed. Different wiki pages will be separated by a page break.
     167This format will create a book-like PDF document. A front page that can show title, subject, date and version is inserted at the beginning of the document. A 'Table of Contents' is also inserted after the front page. Any further ocurrences of ![[PageOutline]] will be removed. Different wiki pages will be separated by a page break.
    166168
    167169This is specially useful for combining several wiki pages from the administrative interface:
     
    171173=== Printable HTML
    172174
    173 This option will just convert to wiki text to HTML, and display it in  the browser with some styles, so it can be printed directly from the browser.
     175This option will just convert to wiki text to HTML, and display it in the browser with some styles, so it can be printed directly from the browser.
    174176
    175177=== Combining pages
    176178
    177 When enabling the plugin, a new !WikiPrint  panel will be available in administration. From this panel, you can select a set of pages, and export them to any of the supported formats.
     179When enabling the plugin, a new !WikiPrint panel will be available in administration. From this panel, you can select a set of pages, and export them to any of the supported formats.
    178180
    179181You can specify a Title, Subject, Date and Version for the exported document.
     
    181183=== Tag replacement
    182184
    183 When defining the contents of the ''front page'' file (using HTML), or the ''extra contents''  file (HTML for header, footer or other frames), some special tags can be used, and they will be replaced before exporting the document.
     185When defining the contents of the ''front page'' file (using HTML), or the ''extra contents'' file (HTML for header, footer or other frames), some special tags can be used, and they will be replaced before exporting the document.
    184186
    185187The following tags are supported: