Skip to content

Commit 5efcec8

Browse files
committed
Added paragraph line height to Readme
1 parent 8883667 commit 5efcec8

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ the following lines to your ``composer.json``.
3939
* [Section settings](#section-settings)
4040
* [Section page numbering](#section-page-numbering)
4141
3. [Texts](#texts)
42-
4. [Tables](#tables)
42+
4. [Paragraph Style](#paragraph-style)
43+
* [Attributes](#paragraph-style-attributes)
44+
5. [Tables](#tables)
4345
* [Cell Style](#tables-cell-style)
44-
5. [Images](#images)
46+
6. [Images](#images)
47+
* [Attributes](#images-attributes)
4548

4649
<a name="basic-usage"></a>
4750
#### Basic usage
@@ -176,10 +179,24 @@ $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle);
176179

177180
```php
178181
$textrun = $section->createTextRun();
179-
$textrun->addText('I am bold', array('bold' => true));
182+
$textrun->addText('I am bold', array('bold' => true));
180183
$textrun->addText('I am italic, array('italic' => true));
181184
$textrun->addText('I am colored, array('color' => 'AACC00'));
182185
```
186+
187+
<a name="paragraph-style"></a>
188+
#### Paragraph Style
189+
190+
<a name="paragraph-style-attributes"></a>
191+
##### Attributes
192+
193+
* ``line-height`` text line height, e.g. _1.0_, _1.5_, ect...
194+
* ``align`` paragraph alignment, _left_, _right_ or _center_
195+
* ``spaceBefore`` space before Paragraph
196+
* ``spaceAfter`` space after Paragraph
197+
* ``tabs`` set of Custom Tab Stops
198+
* ``indent`` indent by how much
199+
183200
<a name="tables"></a>
184201
#### Tables
185202

@@ -213,15 +230,17 @@ $section = $PHPWord->createSection();
213230
$section->addImage('mars.jpg');
214231
```
215232

216-
Images settings include:
233+
<a name="images-attributes"></a>
234+
##### Attributes
235+
217236
* ``width`` width in pixels
218237
* ``height`` height in pixels
219238
* ``align`` image alignment, _left_, _right_ or _center_
220239
* ``marginTop`` top margin in inches, can be negative
221240
* ``marginLeft`` left margin in inches, can be negative
222241
* ``wrappingStyle`` can be _inline_, _square_, _tight_, _behind_, _infront_
223242

224-
To add an image with settings, consider the following example.
243+
To add an image with attributes, consider the following example.
225244

226245
```php
227246
$section->addImage(
@@ -234,4 +253,4 @@ $section->addImage(
234253
'wrappingStyle' => 'behind'
235254
)
236255
);
237-
```
256+
```

0 commit comments

Comments
 (0)