Dolibarr/dolibarr — pull request #811 by lrq3000 (2013-04-07 15:35:50+00:00)
Title: update: Sync odtphp lib (fix a lot of bugs and add a few functionalities)

Ref: https://github.com/lrq3000/odtphp/commit/b4e02a1306f4d5888b076dea808effe449b9cf3d

I have finally forrked the odtphp library, and merged a few changes from myself, Dolibarr, and from a few community patches. This is probably the most up-to-date release with never seen before patches.

The repository lives here:

https://github.com/lrq3000/odtphp

This pull request will fix a few bugs like locale-aware errors (width and height having a comma "," instead of "." as separator, which leads to errors in the generation of the ODT), the corruption of ODT document when incorporating images in segments (products lines), and the substitution of tags in styles (ie: tags in headers and footers should now be substituted correctly).

This also adds a few functionalities: php code evaluation - but not implemented in Dolibarr, if you wish to add it, simply add $odfHandler->phpEval(); at the end of write_file(), see the old patch proposition:

https://github.com/lrq3000/dolibarr_customfields/commit/a27b99af6b6f95638619153ff42ab235e486833e

And a script to automatically convert ODT to PDF using JODConverter and OpenOffice/LibreOffice (there is a post on the forum of a user explaining how to do it manually, but here it's automated and standardized).

Future changes to the odtphp library should be done in a fork of my repository (https://github.com/lrq3000/odtphp), and then synced into Dolibarr. This will ease the tracking of the changes since this is an independent library of Dolibarr.