3
3
Elements
4
4
========
5
5
6
- Below are the matrix of element availability in each container. The column shows
7
- the containers while the rows lists the elements.
8
-
9
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
10
- | Num | Element | Section | Header | Footer | Cell | Text Run | Footnote |
11
- +=====+===============+=========+========+========+======+==========+ ==========+
12
- | 1 | Text | v | v | v | v | v | v |
13
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
14
- | 2 | Text Run | v | v | v | v | \ - | \- |
15
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
16
- | 3 | Link | v | v | v | v | v | v |
17
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
18
- | 4 | Title | v | ? | ? | ? | ? | ? |
19
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
20
- | 5 | Preserve Text | ? | v | v | v\* | ? | ? |
21
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
22
- | 6 | Text Break | v | v | v | v | v | v |
23
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
24
- | 7 | Page Break | v | \ - | \ - | \- | \- | \- |
25
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
26
- | 8 | List | v | v | v | v | \ - | \- |
27
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
28
- | 9 | Table | v | v | v | ? | \ - | \- |
29
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
30
- | 10 | Image | v | v | v | v | v | v |
31
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
32
- | 11 | Watermark | \ - | v | \ - | \- | \- | \- |
33
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
34
- | 12 | Object | v | v | v | v | v | v |
35
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
36
- | 13 | TOC | v | \ - | \ - | \- | \- | \- |
37
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
38
- | 14 | Footnote | v | \ - | \ - | v\*\* | v\*\* | \- |
39
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
40
- | 15 | Endnote | v | \ - | \ - | v\*\* | v\*\* | \- |
41
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
42
- | 16 | CheckBox | v | v | v | v | ? | ? |
43
- +-----+---------------+---------+--------+--------+------+----------+ ----------+
6
+ Below are the matrix of element availability in each container. The
7
+ column shows the containers while the rows lists the elements.
8
+
9
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
10
+ | Num | Element | Section | Header | Footer | Cell | Text Run | Footnote |
11
+ +======= +================= +=========== +========== +========== +========= +============+== ==========+
12
+ | 1 | Text | v | v | v | v | v | v |
13
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
14
+ | 2 | Text Run | v | v | v | v | - | - |
15
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
16
+ | 3 | Link | v | v | v | v | v | v |
17
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
18
+ | 4 | Title | v | ? | ? | ? | ? | ? |
19
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
20
+ | 5 | Preserve Text | ? | v | v | v\* | ? | ? |
21
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
22
+ | 6 | Text Break | v | v | v | v | v | v |
23
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
24
+ | 7 | Page Break | v | - | - | - | - | - |
25
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
26
+ | 8 | List | v | v | v | v | - | - |
27
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
28
+ | 9 | Table | v | v | v | ? | - | - |
29
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
30
+ | 10 | Image | v | v | v | v | v | v |
31
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
32
+ | 11 | Watermark | - | v | - | - | - | - |
33
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
34
+ | 12 | Object | v | v | v | v | v | v |
35
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
36
+ | 13 | TOC | v | - | - | - | - | - |
37
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
38
+ | 14 | Footnote | v | - | - | v\*\* | v\*\* | - |
39
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
40
+ | 15 | Endnote | v | - | - | v\*\* | v\*\* | - |
41
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
42
+ | 16 | CheckBox | v | v | v | v | ? | ? |
43
+ +------- +----------------- +----------- +---------- +---------- +--------- +------------+-- ----------+
44
44
45
45
Legend:
46
46
47
- - ``v `` Available
48
- - ``v* `` Available only when inside header/footer
49
- - ``v** `` Available only when inside section
50
- - ``- `` Not available
51
- - ``? `` Should be available
47
+ - ``v `` Available
48
+ - ``v* `` Available only when inside header/footer
49
+ - ``v** `` Available only when inside section
50
+ - ``- `` Not available
51
+ - ``? `` Should be available
52
52
53
53
Texts
54
54
-----
55
55
56
56
Text can be added by using ``addText `` and ``addTextRun `` method.
57
57
``addText `` is used for creating simple paragraphs that only contain
58
- texts with the same style. ``addTextRun `` is used for creating
59
- complex paragraphs that contain text with different style (some bold,
60
- other italics, etc) or other elements, e.g. images or links. The
61
- syntaxes are as follow:
58
+ texts with the same style. ``addTextRun `` is used for creating complex
59
+ paragraphs that contain text with different style (some bold, other
60
+ italics, etc) or other elements, e.g. images or links. The syntaxes are
61
+ as follow:
62
62
63
63
.. code-block :: php
64
64
@@ -200,7 +200,7 @@ method or using the ``pageBreakBefore`` style of paragraph.
200
200
201
201
:: code-block:: php
202
202
203
- $section->addPageBreak();
203
+ \\ $section->addPageBreak();
204
204
205
205
Lists
206
206
-----
@@ -225,8 +225,8 @@ Parameters:
225
225
226
226
Advanced usage:
227
227
228
- You can also create your own numbering style by changing the `` $listStyle `` parameter
229
- with the name of your numbering style.
228
+ You can also create your own numbering style by changing the
229
+ `` $listStyle `` parameter with the name of your numbering style.
230
230
231
231
.. code-block :: php
232
232
@@ -246,11 +246,14 @@ with the name of your numbering style.
246
246
Level styles:
247
247
248
248
- ``start `` Starting value
249
- - ``format `` Numbering format bullet|decimal|upperRoman|lowerRoman|upperLetter|lowerLetter
249
+ - ``format `` Numbering format
250
+ bullet\| decimal\| upperRoman\| lowerRoman\| upperLetter\| lowerLetter
250
251
- ``restart `` Restart numbering level symbol
251
- - ``suffix `` Content between numbering symbol and paragraph text tab|space|nothing
252
- - ``text `` Numbering level text e.g. %1 for nonbullet or bullet character
253
- - ``align `` Numbering symbol align left|center|right|both
252
+ - ``suffix `` Content between numbering symbol and paragraph text
253
+ tab\| space\| nothing
254
+ - ``text `` Numbering level text e.g. %1 for nonbullet or bullet
255
+ character
256
+ - ``align `` Numbering symbol align left\| center\| right\| both
254
257
- ``left `` See paragraph style
255
258
- ``hanging `` See paragraph style
256
259
- ``tabPos `` See paragraph style
@@ -326,15 +329,15 @@ See ``Sample_09_Tables.php`` for more code sample.
326
329
Images
327
330
------
328
331
329
- To add an image, use the ``addImage `` method to sections, headers, footers,
330
- textruns, or table cells.
332
+ To add an image, use the ``addImage `` method to sections, headers,
333
+ footers, textruns, or table cells.
331
334
332
335
.. code-block :: php
333
336
334
337
$section->addImage($src, [$style]);
335
338
336
- - ` source ` String path to a local image or URL of a remote image
337
- - ` styles ` Array fo styles for the image. See below.
339
+ - source String path to a local image or URL of a remote image
340
+ - styles Array fo styles for the image. See below.
338
341
339
342
Examples:
340
343
@@ -419,10 +422,10 @@ Options for ``$tocStyle``:
419
422
Footnotes & endnotes
420
423
--------------------
421
424
422
- You can create footnotes with ``addFootnote `` and endnotes with `` addEndnote ``
423
- in texts or textruns, but it's recommended to use textrun to have better layout.
424
- You can use ``addText ``, ``addLink ``, `` addTextBreak ``, `` addImage ``,
425
- ``addObject `` on footnotes and endnotes.
425
+ You can create footnotes with ``addFootnote `` and endnotes with
426
+ `` addEndnote `` in texts or textruns, but it's recommended to use textrun
427
+ to have better layout. You can use ``addText ``, ``addLink ``,
428
+ ``addTextBreak ``, `` addImage ``, `` addObject `` on footnotes and endnotes.
426
429
427
430
On textrun:
428
431
@@ -448,9 +451,9 @@ On text:
448
451
$footnote = $section->addFootnote();
449
452
$footnote->addText('Footnote text.');
450
453
451
- The footnote reference number will be displayed with decimal number starting
452
- from 1. This number use ``FooterReference `` style which you can redefine by
453
- ``addFontStyle `` method. Default value for this style is
454
+ The footnote reference number will be displayed with decimal number
455
+ starting from 1. This number use ``FooterReference `` style which you can
456
+ redefine by ``addFontStyle `` method. Default value for this style is
454
457
``array('superScript' => true) ``;
455
458
456
459
Checkboxes
0 commit comments