DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:xslfo

XSLFO Plugin

Compatible with DokuWiki

Weatherwax

plugin Export DokuWiki pages to PDF with an XSL-FO processor.

Last updated on
2014-01-29
Provides
Render
Repository
Source
Requires
xml

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

Tagged with export, pdf

Installation

External requirements: This plugin requires a XSL processor such as Apache FOP to be installed separately.

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. 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>

Configuration and settings

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}"

XSL-FO templates

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.

Processor command

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}"

Development

Change Log

Bugs and other issues

Please report all bugs on the plugin's Github issue-tracker, and not on this page.

plugin/xslfo.txt · Last modified: 2015-12-06 14:32 by Aleksandr