@@ -53,17 +53,20 @@ With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your
53
53
PHPWord requires the following:
54
54
55
55
- PHP 5.3+
56
- - [ Zip extension] ( http://php.net/manual/en/book.zip.php )
57
56
- [ XML Parser extension] ( http://www.php.net/manual/en/xml.installation.php )
57
+ - [ Zend\Validator component] ( http://framework.zend.com/manual/current/en/modules/zend.validator.html )
58
+ - [ Zip extension] ( http://php.net/manual/en/book.zip.php ) (optional, used to write DOCX and ODT)
58
59
- [ GD extension] ( http://php.net/manual/en/book.image.php ) (optional, used to add images)
59
60
- [ XMLWriter extension] ( http://php.net/manual/en/book.xmlwriter.php ) (optional, used to write DOCX and ODT)
60
61
- [ XSL extension] ( http://php.net/manual/en/book.xsl.php ) (optional, used to apply XSL style sheet to template )
61
62
- [ dompdf] ( https://github.com/dompdf/dompdf ) (optional, used to write PDF)
62
63
63
64
## Installation
64
65
65
- It is recommended that you install the PHPWord library [ through composer] ( http://getcomposer.org/ ) . To do so, add
66
- the following lines to your `` composer.json `` .
66
+ PHPWord is installed via [ Composer] ( https://getcomposer.org/ ) .
67
+ You just need to [ add dependency] ( https://getcomposer.org/doc/04-schema.md#package-links> ) on PHPWord into your package.
68
+
69
+ Example:
67
70
68
71
``` json
69
72
{
@@ -73,21 +76,13 @@ the following lines to your ``composer.json``.
73
76
}
74
77
```
75
78
76
- Alternatively, you can download the latest release from the [ releases page] ( https://github.com/PHPOffice/PHPWord/releases ) .
77
- In this case, you will have to register the autoloader.
78
-
79
- ``` php
80
- require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
81
- \PhpOffice\PhpWord\Autoloader::register();
82
- ```
83
-
84
79
## Getting started
85
80
86
81
The following is a basic usage example of the PHPWord library.
87
82
88
83
``` php
89
84
<?php
90
- require_once 'src/PhpWord/Autoloader .php';
85
+ require_once 'bootstrap .php';
91
86
\PhpOffice\PhpWord\Autoloader::register();
92
87
93
88
// Creating the new document...
0 commit comments