Learn about DokuWiki
Learn about DokuWiki
⇐ dw2pdf plugin
The plugin provides a few configuration settings that can be configured in the Configuration Manager. Some can be overridden via url-parameters.
Per way of export a list of URL-parameters:
do=export_pdf– (required) Export current wiki page
do=export_pdfns– (required) Export the requested namespace
book_ns=<namespace>– (required) Exported namespace
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
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
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
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.
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).
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
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.
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.
The plugin automatically uses
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.
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.
Lets you show or hide the export button in the pagetools.