pdx:transformDocument

Transforms .docx documents into another formats (.pdf, .doc, .rtf, .html).

Description

Element definition

This element allows to transform a docx, generated or not with xmldocx, into PDF, DOC, RTF, ODF or HTML preserving, as much as possible, the original formatting options.

You may find more info regarding this element in the Conversion plugin help section and in our Tutorial.

This method uses OpenOffice or LibreOffice to transform the documents. It is compatible with Linux, Windows and macOS and offers perfect results in most of the cases, but in some templates it will be required to perform small changes to get a satisfactory output.

Attributes and sub-elements

src

Path to the docx that you want to convert to a different format.

target

Path to the resulting transformed document (.pdf, .doc, .rtf, .odf or .html).

Code samples
#Example 1

config.xml

content.xml

settings.xml

The resulting Pdf document looks like: