Summary: Generate a PDF
Version: 2015-02-22
Prerequisites: Requires at least PmWiki version: 2.2.x; last tested on PmWiki version: 2.2.35
Status: Stable
Maintainer: the_CName,
Discussion: PmWiki2PDF-v2-Talk

Questions answered by this recipe

All sections are optional, you can remove those that do not apply to your recipe, and add new ones.


PmWiki2PDF v2 : Generate a PDF by PmWiki Pages.


Download the archive from:

Once the archive is downloaded, you must decompress it. Rename the main folder to "pmwiki2pdf-v2" and then upload it to your webspace hosting your pmwiki in the directory /cookbook/.



=> Modify [your template].tmpl to include this code:

<a href="$PageUrl?action=pdf" title="Read this web page on format .pdf" >
<acronym title="Portable Document Format" lang="en">PDF</acronym>


=> Modify your GroupHeader, or GroupFooter, or your page by editing, and add this code:

%right% '-[[{$FullName}?action=pdf | PDF]]-'

==> or upload an icone pdf (please, view in package): %right% '-[[{$FullName}?action=pdf | Attach:acrobat.png]]-'

Config file pmwiki

You need to add in the file config pmwiki, the following `PHP code:


and this - since the element 'dl' is not supported:


This is being done, save your config file and upload it again on the web space on your PmWiki.

Config file cookbook PmWiki2PDF

The file config.php is really intended to set certain options.

Options to:

  • Management pdf file - used to generate it, obtaining the necessary information.
  • display the copyright included in the pdf
  • other possible actions.

Other Files

It is also possible to modify the following files:



Change log / Release notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

Cookbook /
BackupHTMLZip  Export your wiki to static HTML then optionally compress/zip it (Experimental)
EPUBCreation  Assembles wiki page collections into an EPUB e-book file (EPUB output is ready for beta testing)
ExportHTML  Export PmWiki pages as "static" HTML pages
ExportHTMLWiki  Create a wiki using static HTML pages as front end for visitors (stable)
GeneratePDF  Generate PDF versions of pages (?action=pdf) (Stable)
PrintGroup  Export WikiGroup pages to one large HTML file, and/or to PDF (Experimental)
PublishPDF  Typesets wiki page collections into PDF (finalist: New Zealand open source awards 2008) (Stable, reliable and substantially complete, php 5.5 compliant)
PublishWikiTrail  Provide the ability to publish the pages of a wiki trail as a single web page, formatted for printing
WikiConversion  Recipes for converting other wikis from and to PmWiki




See discussion at PmWiki2PDF-v2-Talk

User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.