Docx

Component ID

1694708

Component name

Docx

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Convert node content into a Word (docx) document

The Docx module in conjunction with the Docx node module allows users to download node content as Word documents. The point is to enable people to have the content in the form of a docx document which they can then easily further edit (or whatever they want to do with it) with Word. This is an alternative to simply copying and pasting a web page into Word - which can lead to results which are hard to work with - and not necessarily particularly attractive. This is not designed to reproduce complex layout in a Word document, but rather create a document which is easy and familiar for end users to use.

Theming

Docx node comes with a default docx theming function for defining how your docx document looks and what it should have in it. This inserts the title of a node into the document, converts the HTML content of the node, adds page numbering and you can also define a footer message. Developers can override this function by defining their own theming function(s) - this can be different for each node type.

The result of the conversion will be at docx/node/node_id (e.g. http://example.com/docx/node/7) or docx/node/node_id/revisions/revision_id (e.g. http://example.com/docx/node/7/revisions/14) for a node revision.

Drupal version

This module is designed for Drupal 6 at present. It shouldn't take much to adapt it for Drupal 7.

Requirements

External (non-Drupal) libraries

This module requires code from the HTML to Docx converter project (also written by the author of this module) and the PHPWord project. Instructions for how to get this code and what to do with it are supplied in the README.txt that comes with the module.

Other modules

The following modules are required:

PHP requirements

  • PHP 5.2.x or newer
  • PHP Extension ZipArchive
  • PHP XML support (usually enabled by default)