Compatible with DokuWiki
Weatherwax
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to dw2pdf
External requirements: This plugin requires a XSL processor such as Apache FOP to be installed separately.
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
To add a link to your site template, add the following code somewhere appropriate:
<a id='export-pdf-link' href="<?= wl($ID, array('do'=>'export_xslfo','rev'=>$REV)) ?>" title='Get a PDF copy of this document'> <img src="<?= DOKU_BASE ?>lib/images/fileicons/pdf.png" alt='PDF file type icon' /> Printable PDF version </a>
Option | Description | Default |
---|---|---|
output | Display the PDF file in the browser, or prompt to download it? | Browser |
usecache | Cache the PDF? | Yes |
template | XSL template to use by default. Explained below. | default.xsl |
command | The processor command. | fop -xml "{xml}" -xsl "{xsl}" -pdf "{pdf}" |
The plugin comes with a default.xsl
template, which produces a basic PDF. Site templates (i.e. in the /lib/tpl
directory) can supply their own XSL files. These will be available to be selected from a dropdown menu on the main site configuration page. All .xsl
files in the current site template's directory will be available.
This template can be overridden for individual pages by adding &tpl=name.xsl
to the end of the URL.
The default template is not yet complete and does not handle all Dokuwiki syntax. It's got the basics, but if you find any problems please raise an issue on Github, and we'll get it sorted.
The processor command will have {xml}
, {xsl}
, and {pdf}
replaced by the correct filesystem paths.
For example, on Windows this might be:
C:\Progra~1\fop\fop.bat -xml "{xml}" -xsl "{xsl}" "{pdf}"
Please report all bugs on the plugin's Github issue-tracker, and not on this page.