Exports

Version 4.2 by Vincent Massol on 2008/05/26
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Exports

XWiki offers the ability to export a single wiki page or a set of wiki pages into several formats:

Invalid macro parameters used for the [toc] macro. Cause: [Failed to validate bean: [must be greater than or equal to 1]]. Click on this message for details.

To perform a page export simply go to the page, select the "Print" menu (in the Albatross/Toucan skins - if you use another skin it may be located somewhere else) and select the type of export you wish to perform as shown in the following screenshot.

export.png

Right now we don't have any user interface for exporting a set of wiki pages. This is a work in progress. For now please follow the instructions below for each export format.

PDF Export

To export a page as PDF use the action menu as explained above or use the following type of URL:

http://server/xwiki/bin/export/Spave/Page?format=pdf

In addition the following URL parameters can be added to refine what should be exported:

  • pages: There can be several such parameters, each representing a page to export. For example: &pages=Main.WebHome&pages=Blog.WebHome.
  • includechilds: the value is a number specifying the depth of children pages to include in the PDF export. For example &includechilds=2 will include all children pages of the page to export, all its children (i.e. pages which have the page as its parent) and all the children's children.
  • includelinks: the value is a number specifying the depth of linked pages to include in the PDF export. For example &includelinks=2 will include all pages linked from the page to export and the links in the linked pages.
  • pagebreaks: if the value is set to 1 then a page break is inserted between each page exported.
  • comments: if set to 1 then also export the comments.
  • attachments: if set to 1 then also export the attachments (only if they are images).

Customizing the PDF look & Feel

TODO: Explain the pdftemplate parameter + the XWiki.PDFClass class.

RTF Export

The RTF export works exactly in the same manner as the PDF export.

XAR Export

The XAR export allows exporting pages in the internal XML format used by XWiki. This is the format that you can use to Import/Export pages and applications into/from XWiki instances.

To export a page as a XAR use the action menu as explained above or use the following type of URL:

http://server/xwiki/bin/export/Spave/Page?format=xar

In addition the following URL parameters can be added to refine what should be exported:

  • pages: There can be several such parameters, each representing a page to export. For example: &pages=Main.WebHome&pages=Blog.WebHome.
  • history: If defined then also export the page's history. Example: &history=true
  • backup: If defined then the export is considered a backup pack...
  • author: If defined, specifies the author's name in the XAR export which can later be viewed when reimporting into a XWiki instance.
  • description: If defined, gives a description added to the XAR export which can later be viewed when reimporting into a XWiki instance.
  • license: If defined, specifies the license to the XAR export which can later be viewed when reimporting into a XWiki instance.
  • version: If defined, specifies the version of the export to the XAR.

HTML Export

TODO

Tags:
   

Get Connected