.. _setup: Installing/configuring ====================== Requirements ------------ Mandatory: - PHP 5.3.3+ - `XML Parser `__ extension - `Laminas Escaper `__ component Optional: - `Zip `__ extension - `GD `__ extension - `XMLWriter `__ extension - `XSL `__ extension - `dompdf `__ library Installation ------------ PHPWord is installed via `Composer `__. You just need to `add dependency `__ on PHPWord into your package. Example: .. code-block:: json { "require": { "phpoffice/phpword": "v0.18.*" } } If you are a developer or if you want to help us with testing then fetch the latest branch for developers. Notice: all contributions must be done against the developer branch. Example: .. code-block:: json { "require": { "phpoffice/phpword": "dev-develop" } } Using samples ------------- More examples are provided in the ``samples`` directory. For an easy access to those samples launch ``php -S localhost:8000`` in the samples directory then browse to http://localhost:8000 to view the samples.