It's better when it's simple

User Tools

Site Tools


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.

Initiate export 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
    (See Syntax for layouted link)
    • 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) or date
    • excludes[]=<ns:ns:page> – (optional) Full page id with namespace to be excluded from export. Repeat the parameter to exclude multiple pages.
    • excludesns[]=<ns:ns> – (optional) Full namespace id (no : before/after) to be excluded from export. Repeat the parameter to exclude multiple namespaces.
  • 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
  • Export a selection saved by the Bookcreator Plugin (only possible if Bookcreator plugin is installed)
    (See also Bookcreator syntax for layouted links)
    • do=export_pdfbook – (required)
    • savedselection=<Page id> – (required) Page name(default also title of saved selection) without the namespace
    • book_title=<urlencode%20title> – (optional) Replace default title of the saved selection.
    • 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.


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.


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.


Double-sided document

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

and 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>. Correct sample: ?do=export_pdf&toc=1&toclevels=top


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.


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 URL-parameter


Adding this parameter to the url adds a water mark to your document e.g. &watermark=DRAFT.

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.


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 the QR-code library of mPDF (docs). 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: 2023-08-15 08:40 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki