Print to PDF We recommend viewing the wiki article in your browser and using print to pdf. You can adjust your template for the wiki to format it best for printing. On Mac, choose Save to PDF… from the print dialog box. On Windows, grab a free tool such as CutePDF.

Programmatic exports. If you need to export many pages or export programmatically, there are many options, all fairly complex. Here are some basics:

  • Wiki articles are stored in the database as raw html – good
  • Intra-wiki and case links are relative – tricky
  • Embedded images and attachments’ URLs can be accessed programmatically by adding an XML API logon token to the end. Use cmd=viewArticle to get the wiki page, then find the attachment *href*s (or image *src*s) and fetch them. – good
  • If you use plugins in your wiki such as the Table of Contents or other Wikiblock plugins, these only put a placeholder in the HTML which is dynamically replaced on render – tricky

Some things to try:

  • Have your live documentation site use the XML API to pull the article’s HTML when the user requests a document on your site. The script on your site would then need to fix relative links. You would also need to make sure the wiki is publicly accessible so images and attachments work, or store an API logon token in the script on your site for fetching them.
  • Spider the wiki either as a user would, or better with the XML API. convert links, etc, apply styles and save the documents in your desired format. See this article for an outline.