News

PHPDocX v3.0 release notes

  • 01 / 08 / 2013

We have just released PHPDocX v3.0.
This new version includes substantial changes that have required that this new version were not fully backwards compatible with the latest v2.7.
Nevertheles the changes in the API are not difficult to implement in already existing scripts and the advantages are multiple.
The main changes are summarized as follows:

The new version handles in a different way the embedding of Word elements within other elements like tables, lists and headers/footers. The majority of methods have now a ‘rawWordML’ option that in combination with the new ‘createWordMLFragment’ allows for the generation of chunks of WordMl code that can be inserted with great flexibility anywhere within the Word document. its is now, for example, trivial to include paragraphs, charts, tables, etcetera in a table cell.
One may create sophisticated headers and footers with practically no restriction whatsoever by the use of the ‘createWordMLFragment’ method.
The embedHTML and replaceTemplateVariableByHTML have been improved to include practically all CSS styles and parse floats. It is also posible now to filter the HTML content via XPath expressions and associate different native Word styles to individual CSS classes, ids or HTML tags.
New chart types have been included: scatter, bubbles, donoughts and the code has been refactor to allow for greater flexibility.
The addSection method has been extended and improved.
The addTextBox method has been greatly improved to include many more formatting options.
The refactored addText method allows for the introduction of line breaks inside a paragraph.
New addPageNumber method.
New addDateAndHour method.
New replaceChartData method that allows for the replacement of chart data values in an existing Word document.

We have also included several minor improvements and bug fixes.
We believe that all these improvements will greatly simplify the required procedures to generate Word documents with PHPDocX.
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 as usual. Please, do not forget to backup your current installation!!