Learn about DokuWiki
Learn about DokuWiki
Compatible with DokuWiki
Previous developer: Luigi Micco
Download and install the plugin using the bundled Extension Manager using the URL given above. Refer to Plugins on how to install plugins manually.
The plugin can't be installed through the plugin manager on pre-Angua releases, because it's too big and the plugin manager will fail while downloading. Please install it manually and make sure the installed directory is named
Only PHP 5.6 and newer are supported by dw2pdf plugin.
To export images with an alpha channel (used for transparency), you need to install the GD library for PHP. For example on Debian systems:
sudo apt-get install php5-gd
Also see the PHP with gd tips page.
The goal of this plugin was to provide a simple, ready-to-go PDF converter that almost faithfully replicates the screen view of your wiki pages (i.e. doesn't convert them to a print-document format like the latex plugin). It also bundles the necessary fonts and libraries (hence the 48MB size) so that you should not need to do any configuration to get it up and running as quickly as possible.
Since July 2017 version 7.0-beta of mPDF library is included, which supports PHP7, but not PHP 5.4 and older.
As (temporary) fallback the following old releases could be found:
There are three ways to export:
do=export_pdfURL parameter. This starts the PDF export of the page. Some templates let the plugin extend the pagetools automatically. For other templates you need to implement this yourself to add a button or similar somewhere in your template design.
do=export_pdfnswhich let you export a chosen entire namespace as one PDF. Create a link with the syntax.
Please refer to the following pages to learn how to use or support the plugin:
To create a link in any wiki page to export any namespace, you can use the following syntax:
namespaceis the namespace you want to export
pdftitleis the title of the generated output PDF
&book_order=pagename) by simply appending them to the pdftitle.
Handling of startpages: If the page
<namespace>:start doesn't exist, it checks if the page with the name
<namespace> exists and will add to the pdf as well.
Please report issues and requests in the issue tracker:
If you are using the dw2pdf plugin and you don't get the wanted output, than you might investigate the data during its workflow. The dw2pdf plugin uses the HTML code of the print version of an wiki article (which has a leaner styling than the screen version) and converts this code with the mPDF-library to a pdf-file.
Some options to investigate with the intermediate results are:
How-to output the plain html (just before it is fed into the mPDF library):
&debughtml=textdisplays html as plain text in the browser
&debughtml=htmldisplays html rendered by the browser
See for the debugging options of the mPDF library related to images: images documentation of mPDF.
Feel free to add yours here:
Not all image format variations are successfully embedded in the PDF, even if they are properly displayed in DokuWiki. If you get missing images in your output, try stripping the Alpha channel of your (e.g. PNG) images.
If using full http links, make sure the permissions are set up for retrieving the image directly (test in a browser). DokuWiki may prevent outside access to images in the data/media directory.
To set fixed password for generated documents, edit:
and add following lines:
$this->setUserRights(); $this->SetProtection(array('print','copy', 'modify'),'password','password');
password is your password :)