make OpenOffice & Office documents using templates
This package can merge OpenOffice and Microsoft Office templates with values, SQL and other data.
It is a plug-in for the TinyButStrong template engine. It can then open compressed documents in the format of OpenOffice or Microsoft Office and replace placeholders in the template by data which can be PHP variables, SQL queries, or other.
The resulting documents are saved to file, served for download or returned as a string.
It can merge any OpenDocuments files, any OpenXML files, and any XML files compressed in a zip archive.
This class you can also insert pictures in the documents, add and deleted any files in the archive.
It can also merge row and columns in Microsoft Excel (xlsx) and OpenOffice Calc (ods) spreadsheets. And also merge data in chart embedded in Microsoft Word documents (docx).
This class can be used to generate OpenOffice by using templates and a template engine to replace the template placeholders by parameter values.
The class extends the template engine class TinyButStrong.
The class allows the creation of OpenOffice documents dynamically, providing the separation between the document formatting logic and content.
In practice, you create a template using OpenOffice with the TinyButStrong tags. Then you create a PHP script that calls the class to merges the document template with dynamically defined data to generate the output OpenOffice document.
Features:
- It works on Linux, Windows and other platforms.
- It works with OpenOffice 1.x documents and the new format used in OpenOffice 2 (OpenDocument 1.0, OASIS standard).
- It does not need an installation of OpenOffice on the server.
- It uses the TinyButStrong native syntax and methods. It can merge 'var' and 'blocks' using the TinyButStrong syntax like (var, block, if, then, frm, ...). The merge results respects the layout, justification and styles used in the template.