In some environments, wiki users prefer a simplified “one click” interface for generating a PDF. This recipe provides a “PDF” link which, when clicked, bypasses the “Download” page and returns the PDF directly. It does this by building a link equivalent to that generated by the download form.
The simplest form of the directive is (:pdf:), which produces PDF and generates a PDF of the current page. Other options are:
An administrator can use the $ServeWikibookOptions array to set up named lists of predefined print metadata values. These can then be invoked by adding the name to the pdf directive. For example, (:pdf plain:) sets the following values:
This example produces: PDF (plain). Click the link to see the result.
Read the source code for examples of how to set up additional named lists. The full markup syntax is:
(:pdf[-<kind>] [<option>]["<option text>"]:)
The recipe also introduces a new global variable, $SimplifyPDFInterface. If an administrator sets $SimplifyPDFInterface = 1 before loading the one click PDF recipe, the following settings are turned off:
Finally, (:book TrailPageName | link text:) lets an author typeset a book from a page other than the trail page.
Contributor: John Rankin, Friday, 23 July 2010, based on suggestions from Frank.