2014-03-15 10:00:09 +01:00
|
|
|
.. _setup:
|
|
|
|
|
|
2014-04-26 14:21:52 +07:00
|
|
|
Installing/configuring
|
2014-03-20 22:53:48 +07:00
|
|
|
======================
|
2014-03-19 23:08:44 +07:00
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
|
------------
|
|
|
|
|
|
|
|
|
|
Mandatory:
|
|
|
|
|
|
2015-10-10 19:06:23 +04:00
|
|
|
- PHP 5.3+
|
2015-11-14 17:30:22 +04:00
|
|
|
- `XML Parser <http://www.php.net/manual/en/xml.installation.php>`__ extension
|
2015-11-14 17:32:32 +04:00
|
|
|
- `Zend\\Validator <http://framework.zend.com/manual/current/en/modules/zend.validator.html>`__ component
|
2014-03-19 23:08:44 +07:00
|
|
|
|
2015-11-14 17:30:22 +04:00
|
|
|
Optional:
|
2014-03-19 23:08:44 +07:00
|
|
|
|
2015-11-14 17:30:22 +04:00
|
|
|
- `Zip <http://php.net/manual/en/book.zip.php>`__ extension
|
|
|
|
|
- `GD <http://php.net/manual/en/book.image.php>`__ extension
|
|
|
|
|
- `XMLWriter <http://php.net/manual/en/book.xmlwriter.php>`__ extension
|
|
|
|
|
- `XSL <http://php.net/manual/en/book.xsl.php>`__ extension
|
2015-11-14 17:34:30 +04:00
|
|
|
- `dompdf <https://github.com/dompdf/dompdf>`__ library
|
2014-03-19 23:08:44 +07:00
|
|
|
|
2014-03-15 10:00:09 +01:00
|
|
|
Installation
|
2014-03-19 23:08:44 +07:00
|
|
|
------------
|
|
|
|
|
|
2015-11-14 16:50:52 +04:00
|
|
|
PHPWord is installed via `Composer <https://getcomposer.org/>`__.
|
|
|
|
|
You just need to `add dependency <https://getcomposer.org/doc/04-schema.md#package-links>`__ on PHPWord into your package.
|
2014-03-19 23:08:44 +07:00
|
|
|
|
2015-11-14 16:50:52 +04:00
|
|
|
Example:
|
2015-11-14 17:24:36 +04:00
|
|
|
|
2014-03-21 10:07:17 +01:00
|
|
|
.. code-block:: json
|
2014-03-15 10:00:09 +01:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
"require": {
|
2015-11-14 16:50:52 +04:00
|
|
|
"phpoffice/phpword": "v0.13.*"
|
2014-03-15 10:00:09 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-22 14:51:21 +02:00
|
|
|
If you are a developer or if you want to help us with testing then fetch the latest branch for developers.
|
2015-10-10 19:06:23 +04:00
|
|
|
Notice: all contributions must be done against the developer branch.
|
2014-09-22 14:51:21 +02:00
|
|
|
|
2015-11-14 16:50:52 +04:00
|
|
|
Example:
|
2015-11-14 17:24:36 +04:00
|
|
|
|
2014-09-22 14:51:21 +02:00
|
|
|
.. code-block:: json
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
"require": {
|
|
|
|
|
"phpoffice/phpword": "dev-develop"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-03-19 23:08:44 +07:00
|
|
|
Using samples
|
|
|
|
|
-------------
|
|
|
|
|
|
2014-03-20 22:53:48 +07:00
|
|
|
After installation, you can browse and use the samples that we've
|
2014-03-19 23:08:44 +07:00
|
|
|
provided, either by command line or using browser. If you can access
|
2014-03-26 16:33:20 +07:00
|
|
|
your PHPWord library folder using browser, point your browser to the
|
2014-03-23 17:37:26 +07:00
|
|
|
``samples`` folder, e.g. ``http://localhost/PhpWord/samples/``.
|