Conversion plugin phpdocx

Common problems and possible errors

Common problems and possible errors
  • Temporary directory: If you run OpenOffice along with OdfConverter, it is necessary to create a temporary ODT document.

    To create the ODT it is mandatory to have read and write permissions in a temporary directory. If you can't use the OS temp folder, the transformDocument method allows to set a new one.
  • .wapi directory: When working with OpenOffice as a transformation method, phpdocx applies OdfConverter to improve the final document quality. This program is included for Linux 32 and 64bits and Windows with phpdocx. It performs several transformations with .NET.

    For proper functioning with a web server like Apache, you must create a .wapi directory in the root of the web server.
    An example could be /var/www/.wapi, with read and write permissions for the corresponding user.
    The absence and need of this directory, and the path where it has to be located, is generated in the log files of the web server you use.
  • altChunk tag. The addExternalFile and replaceVariableByExternalFile methods use the Word altChunk internal tag. This allows to insert external files in a Word document. This tag is Word supported only, so it's not compatible with the conversion plugin.
  • Absence of libraries.
    • ln -s /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3
    • ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.4 /usr/lib/libtiff.so.3
  • Direct or script transformation method. The transformDocument method has two options to transform the documents: direct and script. If the default value doesn't work, try using the script method.
  • Mac OS X and OdfConverter: Mac OS X users have to choose LibreOffice as the transformation method, as OdfConverter is not available for this OS.
  • TOC in PDF: Since phpdocx 4.6, the TOC generation and transformation to PDF is supported. Please check the included documentation to transform it.

Next - Debugging OpenOffice