XML API - pdx:transformDocument

pdx:transformDocument

Transforms documents into other formats (DOCX, PDF, HTML, XHTML, DOC, RTF, PNG, TXT).

Note

You are reading the XML API documentation. For the PHP API method please go to transformDocument.

Description

Element definition

This method allows to transform a DOCX document, generated or not with phpdocx, into PDF, HTML, DOC, RTF, PNG and TXT 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.

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, .html, .xhtml, .docx, .doc, .odt, .rtf, .png or .txt).

Code samples

Example #1

config.xml

content.xml

settings.xml

PHP code

The resulting Word document looks like: