⇐ 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 pagebook_title=<urlencode%20title>
do=export_pdfns
– (required) Export the requested namespacebook_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.selection
is posted with a page list – Export page selection from Bookcreator Pluginbook_title=<urlencode%20title>
– (required)book_skipforbiddenpages=1
– (optional) Default it will not export if not-accessible pages are selected do=export_pdfbook
– (required)savedselection=<Page id>
– (required) Page name(default also title of saved selection) without the namespacebook_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 If a url-parameter is provided, that value is used, otherwise the plugin config setting from the Configuration Manager is used.
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=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~~
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).
toc=0|1
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
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.
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.
watermark=<urlencode%20text>
Adding this parameter to the url adds a water mark to your document e.g. &watermark=DRAFT
.
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.
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.
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.
Lets you show or hide the export button in the pagetools.