DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:dw2pdf:configuration

dw2pdf plugin

Configuration Settings for dw2pdf plugin

The plugin provides a few configuration settings that can be configured in the Configuration Manager. Some can be overridden via url-parameters.

Only via URL-parameters

Per way of export a list of URL-parameters:

  • Export one page
    • do=export_pdf – (required) Export current wiki page
    • book_title=<urlencode%20title>
      (optional) default using the title of the wiki article.
  • Export an entire namespace
    • do=export_pdfns – (required) Export the requested namespace
    • book_ns=<namespace> – (required) Exported namespace
    • book_title=<urlencode%20title> – (required)
    • book_nsdepth=<number> – (optional) Down to which level the pages are collected for inclusion (default: all levels included)
    • book_order=<order> – (optional) Sort included pages by natural(default), date or pagename
  • Export selection of pages via Bookcreator Plugin
    • Parameter selection is posted with a page list – Export page selection from Bookcreator Plugin
    • book_title=<urlencode%20title> – (required)
    • book_skipforbiddenpages=1 – (optional) Default it will not export if not accessible pages are selected

via Configuration Manager, but override-able via URL-parameters

If a url-parameter is provided, that value is used, otherwise the plugin config setting from the Configuration Manager is used.

Pagesize

pagesize=A4|letter|etc
A page format as supported by mPDF. Usually A4 or letter. See the docs for other allowed values for the format parameter of \Mpdf\Mpdf(['format' => '...']); constructor.

Orientation

orientation=portrait|landscape
Page orientation of the whole document, you can select Portrait or Landscape.

Also you can change the orientation of only some pages. Adding the syntax will change the orientation, until you change it with the other orientation syntax.

~~PDF:LANDSCAPE~~
~~PDF:PORTRAIT~~

Double-sided document

doublesided=0|1
By default a double-sided PDF document is outputted. The first page is an odd page (left hand-side page) and further even-odd page pairs are added. Disabling this will output a single-sided document with only odd pages. The single-sided document doesn't add additional blank pages if a Table of Contents or cover page is included (and you can still send it to the printer as double-sided, but it won't have odd-even formatting).

Table of Contents

toc=0|1
toclevels=<top>-<max>
An auto-generated Table of Contents can be included by enabling the setting 'toc' (values: 0 or 1). By default, the same headings are added to the PDF Table of Contents as in the TOC for a wiki article (as set with toptoclevel and maxtoclevel). The range of headings can be overridden by setting 'toclevels' e.g. 1-3. Where the values correspond to <toptoclevel>-<maxtoclevel>.

Bookmarks

maxbookmarks=0|1|2|3|4|5
By default the plugin generates PDF bookmarks for each headline in the source page. You can lower the number here to include only higher level headlines in the bookmarks. Set it 0 to disable bookmarks all together.

Template

tpl=<foldername>
Choose which PDF template should be used by default. The template can be overridden with the tpl request variable e.g. add &tpl=yourtemplate to the export url.

Only via configuration manager

Output Control

The output option controls if PDF should be opened within the Browser (when a PDF plugin is installed and the browser is configured correctly) or should always be downloaded.

Caching

By default, generated PDFs are cached. This includes embedded images. This means the ACLs for embedded images will not be rechecked when a user requests a cached PDF. If this is a problem, you should disable caching.

Plugin Styles

The plugin automatically uses print.css and pdf.css files of installed 3rd party plugins to style plugin content. Often plugins do not provide such styles or you may actually prefer their screen styles. In that case list the names of these plugins here.

QR code

Via a placeholder a QR code can be added in the pdf-templates, which is generated with the size given in the configuration. The plugin uses an online generator. Setting the size to zero will disable this feature.

Show export button

Lets you show or hide the export button in the pagetools.

plugin/dw2pdf/configuration.txt · Last modified: 2017-11-20 23:02 by Klap-in