|
PrintablePage<< | Cookbook-V1 | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalDisplay a wiki page in a form suitable for printing. SolutionAttach:printable-page.php - PHP code Discussion(printable-page.php is included in pmwiki releases) The printable-page.php script adds a special "?action=print" option to wiki pages, which causes the page to be output in a form suitable for printing. WikiAdministrators will probably want to use this script as a guide for customizing their own printable page functionality. The specific steps performed by this script are:
As a demonstration, ThisPage:?action=print will display the printable version of this page using the printable-page.php script given above. The printable-page.php script is also useful for creating Development/WikiBooks -- PDF collections of wiki pages. To use this script, simply add <?php include_once("scripts/printable-page.php"); ?>
to your local.php configuration. If you want to modify this script, it's a good idea to copy it into the local/ subdirectory and make modifications there, and then Revision HistoryModified 29 July 2003 to set the text color to #000000, the font to Georgia, Times Roman or serif, and change <hr ... > to <hr ... />. Modified 30 July to change $PageUrlFmt to $PageUrl. 1 September 2003: see PublishWikiTrail for a combination printable page and publish page script that uses a shared style sheet for improved output quality and consistency. See Also
Contributors
Make sure the
|