anynone/odtphp

ODT document generator

v1.8 2020-07-29 02:50 UTC

This package is not auto-updated.

Last update: 2024-05-02 19:32:53 UTC


README

Original description

OdtPHP is a library to quickly generate Open Document Text-files that can be read by a gigantic set of Office Suites, including LibreOffice, OpenOffice and even Microsoft Office from PHP code. It uses a simple templating mechanism. See the tests/ folder for a set of examples.

This repository already includes the changes suggested by Vikas Mahajan and a number of other bug fixes.

History

This project was initially started by Julien Pauli, Olivier Booklage, Vincent Brouté and published at http://www.odtphp.com (link leads to archived version of page, as it is not available any longer).

Links:

安装

composer -vvv require anynone/odtphp

替换模板变量

$odf = new Odtphp\Odf("account_1.odt");
$odf->setVars("message", "test1111");

$odf->saveToDisk('account_1_over.odt');