Skip to content

Commit 41a311e

Browse files
authored
Create spacing.md
1 parent a572ef5 commit 41a311e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/usage/styles/spacing.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Spacing Styles
2+
3+
``` php
4+
<?php
5+
6+
$phpWord->addParagraphStyle('spacing', ['space' => ['before' => 120, 'after' => 240]]);
7+
$section->addText('Hello, World!', null, 'spacing');
8+
9+
```
10+
11+
See [`Sample_08_ParagraphPagination`](/samples/Sample_08_ParagraphPagination.php) for more code samples.
12+
13+
## Options
14+
- `after`. Space after paragraph in *twip*.
15+
- `before`. Space before paragraph in *twip*.
16+
- `line`. Space between lines within a paragraph in *twip*. If lineRule is auto, 240 (height of 1 line) will be added, so if you want a double line height, set this to 240.
17+
- `lineRule`. Line Spacing Rule. *auto*, *exact*, *atLeast*
18+
* See [`SimpleType > LineSpacingRule`](../simpletypes/linespacingrule.md) class constants for possible values.
19+
20+
## Used In
21+
- [`Style > Paragraph`](../styles/paragraph.md).

0 commit comments

Comments
 (0)