Publishing PageSeeder data to print, the Web or both

Task export-docx

This task can be used to convert a portable or processed PSML document to the Word docx format according to rules defined in the Microsoft Word docx Export Config.

For a list of the latest changes see github .

To use this Ant extension standalone outside PageSeeder you can download the pso-docx-ant-x.jar and pso-docx-core-x.jar files from bintray .


Minimal definition:

<export-docx src="[source]" />

 Full definition:

    name="[param name]"
    value="[param value]"/>


srcPath to the source file to process. It should point to a '.psml' XML file.Yes
destPath to the destination file.
Will default to the name and location of the source with '.docx' extension if unspecified.
workingThe directory holding temporary files. Defaults to []/antdocx-[number].No
templatePath to .dotx template file.No
configPath to .xml config file.No


The following @name and @value attributes are valid for <param> elements - all are optional.

manual-coreWhether to take Word document properties from dotx template,  xml config or manual params (allowed values "Template|Configuration|Manual")
manual-creatorDocument Creator property
manual-revisionDocument Revision property (must be a number)
manual-createdDocument Created Date property (allowed values "Current Date|Pageseeder Document Creation Date")
manual-versionDocument Version property
manual-categoryDocument Category property
manual-titleDocument Title property
manual-subjectDocument Subject property
manual-descriptionDocument Description property


Invoking in Ant

This task is included by default in the PageSeeder publisher so <taskdef/>  is only required when using it outside the publisher.

<project ... xmlns:psd="antlib:org.pageseeder.docx.ant">

  <!-- only required for standalone -->
  <taskdef uri="antlib:org.pageseeder.docx.ant" 

  <target ... >
    <!-- Invoke Task -->
    <psd:export-docx src="test.psml" dest="result.docx"/>

Using a namespace is not required, but it is a good mechanism to know the origin of the task. The recommended namespace is 'psd'.


It is designed to work as standalone. It is possible to invoke this task without being connected to PageSeeder.

Typically this task would be used in the context of a PageSeeder export. In that case, use the Task export and Task process to download the source PSML file.

How does it work?

This Ant task will:

  1. Load the config and template files.
  2. Transform the PSML into docx XML files.
  3. Zip up the XML files and associated images into the docx format.

Created on , last edited on