News

PHPDocX v3.1 release notes

  • Jan 31, 2013

We are happy to announce the release of PHPDocX v3.1
This new version includes quite a few new features that you may find interesting:

  • It is now possible to insert arbitrary content within a paragraph with the updated addText method:
  • multiple runs of text with diverse formatting options (color, bold, size, …)
  • inline or floating images and charts that may be carefully positioned thanks to the new vertical and horizontal offset parameters
  • page numbers and current date
  • footnotes and endnotes
  • line breaks and column breaks
  • links and bookmarks
  • inline HTML content
  • shapes


In general the updated addText method accepts any inline WordML fragment. This will make trivial to insert new elements in paragraphs as they are integrated in PHPDocX (we have already programmed the possibility to integrate form elements and structured document tags for version 3.2 which will be launched by the end of next month).
We have greatly improved the automatic generation of the table of Contents via the addTableContents method. You can now:

request to automatically update the TOC upon the first opening of the document (the user will be automatically prompted to update fields in the Word document)
limit the TOC levels that should be shown (the default value is all)
import the TOC formatting from an existing Word document


The addTemplateImage has now more configuration options so it is no longer necessary to include a placeholder image with the exact size and dpi in the PHPDocX Word template. Moreover you can now use the same generic placeholder image for the whole document simplifying considerably the process.
The logging framework has been updated to the latest stable version of log4php.
You may now use an external script to transform DOCX into PDF (or .doc, .rtf, .html and .odf) using TransformDocAdv.inc class. This script fixes the problems related to runnig system commands using Apache or any other not CGI/FastCGI web server.

Besides these improvements, PHPDocX v3.1 also offers:

Minor improvements in the HTML to Word conversion: one may change the orientation of text within a table cell and avoid the splitting of table rows across pages.
New configuration options for the addImage method
It is now simpler to link internal bookmarks with the addLink method
When merging two Word documents you can choose to insert line breaks between them to clearly separate their content
You can now also import styles using their id (this simplifies some technical tasks)
Minor bug fixes

As usual, all owners of PRO licenses are offered a free update (although a Facebook share or/and an Tweet would be greatly appreciated). Please, log in the website and download the latest version from the “MyPHPDocX” section of the website as usual.
Please, do not forget to backup your current installation!