<= [[wiki:plugin:dw2pdf]] plugin ====== Configuration Settings for dw2pdf plugin====== The plugin provides a few configuration settings that can be configured in the [[plugin:config|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=''\\ (optional) default using the title of the wiki article. * Export an entire namespace\\ (See [[plugin:dw2pdf#syntax|Syntax for layouted link]]) * ''do=export_pdfns'' -- (required) Export the requested namespace * ''book_ns='' -- (required) Exported namespace * ''book_title='' -- (required) * ''book_nsdepth='' -- (optional) Down to which level the pages are collected for inclusion (default: all levels included) * ''book_order='' -- (optional) Sort included pages by ''natural''(default) or ''date'' * ''excludes[]='' -- (optional) Full page id with namespace to be excluded from export. Repeat the parameter to exclude multiple pages. * ''excludesns[]='' -- (optional) Full namespace id (no '':'' before/after) to be excluded from export. Repeat the parameter to exclude multiple namespaces. * Export selection of pages via [[plugin:Bookcreator]] Plugin * Parameter ''selection'' is posted with a page list -- Export page selection from [[plugin:Bookcreator]] Plugin * ''book_title='' -- (required) * ''book_skipforbiddenpages=1'' -- (optional) Default it will not export if not-accessible pages are selected * Export a selection saved by the [[plugin:Bookcreator]] Plugin (only possible if Bookcreator plugin is installed) \\ (See also [[plugin:bookcreator#Direct export a saved selection|Bookcreator syntax for layouted links]]) * ''do=export_pdfbook'' -- (required) * ''savedselection='' -- (required) Page name(default also title of saved selection) without the namespace * ''book_title='' -- (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. ==== 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 [[https://mpdf.github.io/reference/mpdf-functions/construct.html|\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''\\ and ''toclevels=-''\\ 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 [[config:toptoclevel]] and [[config:maxtoclevel]]). The range of headings can be overridden by setting 'toclevels' e.g. ''1-3''. Where the values correspond to ''-''. Correct sample: ''?do=export_pdf&toc=1&toclevels=top'' ==== 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=''\\ Choose which [[plugin:dw2pdf:pdftemplate|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 ===== ==== Watermark ==== ''%%watermark=%%''\\ 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. ==== 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 the [[https://github.com/mpdf/qrcode|QR-code library of mPDF]] ([[https://mpdf.github.io/what-else-can-i-do/barcodes.html|docs]]). Setting the size to zero will disable this feature. ==== Show export button ==== Lets you show or hide the export button in the pagetools.