XmlApi - pdx:encryptDocx

pdx:encryptDocx

Encrypts (AES128) a Word document.

Note

You are reading the XMLAPI documentation. For the API method please go to encryptDocx.

Description

Element definition

This element allows to encrypt a Word document. The final user needs to insert the password included in the options array to access the content of the resulting file.

The encrypted file is a Microsoft Binary Compound File that is directly recognized as an encrypted Word document by the standard Word interface.

You may find a detailed description of this package in the cryptophpdocx section of the API documentation.

Attributes and sub-elements

src

Path to the word document that you want to encrypt.

target

Path to the resulting encrypted document.

Key Description
password The password should be a string of 15 or less characters. If you introduce a password with more than 15 characters it will be automatically truncated.
Code samples

Example #1

config.xml

content.xml

settings.xml

PHP code

The resulting Word document looks like: