There are two main approaches to export wiki articles from FogBugz. You may easily save them as PDFs, as explained below or choose a more complex method to export them programmatically as explained in brevity here.
Print to PDF
We recommend viewing the wiki article in your browser and using the print dialog box to export.
- On Windows:
- Open the article in your browser tab, press CTRL + P to open the print dialog box and choose the Print to Pdf option to export the article.
- On Mac: Open the article in your browser tab, press Command + P to open the print dialog box and select the Save to PDF option to export the article.
On Windows, you may also use free online tools such as CutePDF to do the same.
If you need to export many pages or export programmatically, there are many complex options available. Here is some basic information on approaching a programmatic export:
- 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 login token to the end. Use
cmd=viewArticleto get the wiki page, then find the attachment
*href*s (or image
*src*s) and fetch them. – good
- If you use plugins in your wikis such as the Table of Contents or other Wiki block plugins, these only put a placeholder in the HTML which is dynamically replaced on render – tricky
Some additional things to consider:
- 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 login token in the script on your site for fetching them.
- Spider the wiki either as a user would, or better with the XML API, converts links, applies styles, and saves the documents in your desired format. See this article about online documentation to know more.