Conversion plugin phpdocx

Installation and Set-up


phpdocx includes an OpenOffice pre-compilated version for 32bits Linux operating systems.

You can also use this version in 64bits Linux by installing the compatibility packages of the corresponding 32bits libraries.

For Windows OS, MAC OSX and custom set ups, you can choose the software you like: OpenOffice or LibreOffice. However, it is advisable to work with LibreOffice.

Packages download

It is very important to run the most recent version of OpenOffice or LibreOffice, so you can achieve the maximum compatibility with the DOCX format.

At least, you need to use OpenOffice 3.4 or LibreOffice 4.3.

Download the last version of OpenOffice here:

Download the last version of LibreOffice here:

If you use an old distribution with GLIBC 2.5, you must work with OpenOffice 3.4.0. OpenOffice 3.4.1 and higher need GLIBC 2.7

For Linux operating systems, you can also download the program you want from the distribution official repositories. Always be sure to run the same versions before mentioned, or higher.

Set Up

If you choose LibreOffice instead of OpenOffice, you must modify the config/phpdocxconfig.ini configuration file after installing the conversion plugin.

For LibreOffice, modify the following lines:

  • method: set libreoffice or openoffice. It uses OpenOffices by default.
  • path: Type the absolute path to the LibreOffice executable file. Omit this configuration line if you work with OpenOffice.

For example, type this configuration to use LibreOffice:

Type this if you choose OpenOffice:

Starting OpenOffice in headless mode

If you have chosen OpenOffice as the tool to transform to PDF, you need to start it in headless mode before doing any transformation.

In order to do this with Windows, just open a terminal and execute:

Or with Linux:

Next - Running the first example and options