Docs: Update documentation

This commit is contained in:
Ivan Lanin 2014-04-26 14:21:52 +07:00
parent 0f79eb5186
commit 1635c83b5d
9 changed files with 367 additions and 247 deletions

View File

@ -3,44 +3,44 @@
Elements Elements
======== ========
Below are the matrix of element availability in each container. The column shows Below are the matrix of element availability in each container. The
the containers while the rows lists the elements. column shows the containers while the rows lists the elements.
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| Num | Element | Section | Header | Footer | Cell | Text Run | Footnote | | Num | Element | Section | Header | Footer | Cell | Text Run | Footnote |
+=====+===============+=========+========+========+======+==========+==========+ +=======+=================+===========+==========+==========+=========+============+============+
| 1 | Text | v | v | v | v | v | v | | 1 | Text | v | v | v | v | v | v |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 2 | Text Run | v | v | v | v | \- | \- | | 2 | Text Run | v | v | v | v | - | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 3 | Link | v | v | v | v | v | v | | 3 | Link | v | v | v | v | v | v |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 4 | Title | v | ? | ? | ? | ? | ? | | 4 | Title | v | ? | ? | ? | ? | ? |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 5 | Preserve Text | ? | v | v | v\* | ? | ? | | 5 | Preserve Text | ? | v | v | v\* | ? | ? |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 6 | Text Break | v | v | v | v | v | v | | 6 | Text Break | v | v | v | v | v | v |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 7 | Page Break | v | \- | \- | \- | \- | \- | | 7 | Page Break | v | - | - | - | - | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 8 | List | v | v | v | v | \- | \- | | 8 | List | v | v | v | v | - | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 9 | Table | v | v | v | ? | \- | \- | | 9 | Table | v | v | v | ? | - | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 10 | Image | v | v | v | v | v | v | | 10 | Image | v | v | v | v | v | v |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 11 | Watermark | \- | v | \- | \- | \- | \- | | 11 | Watermark | - | v | - | - | - | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 12 | Object | v | v | v | v | v | v | | 12 | Object | v | v | v | v | v | v |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 13 | TOC | v | \- | \- | \- | \- | \- | | 13 | TOC | v | - | - | - | - | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 14 | Footnote | v | \- | \- | v\*\*| v\*\* | \- | | 14 | Footnote | v | - | - | v\*\* | v\*\* | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 15 | Endnote | v | \- | \- | v\*\*| v\*\* | \- | | 15 | Endnote | v | - | - | v\*\* | v\*\* | - |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
| 16 | CheckBox | v | v | v | v | ? | ? | | 16 | CheckBox | v | v | v | v | ? | ? |
+-----+---------------+---------+--------+--------+------+----------+----------+ +-------+-----------------+-----------+----------+----------+---------+------------+------------+
Legend: Legend:
@ -55,10 +55,10 @@ Texts
Text can be added by using ``addText`` and ``addTextRun`` method. Text can be added by using ``addText`` and ``addTextRun`` method.
``addText`` is used for creating simple paragraphs that only contain ``addText`` is used for creating simple paragraphs that only contain
texts with the same style. ``addTextRun`` is used for creating texts with the same style. ``addTextRun`` is used for creating complex
complex paragraphs that contain text with different style (some bold, paragraphs that contain text with different style (some bold, other
other italics, etc) or other elements, e.g. images or links. The italics, etc) or other elements, e.g. images or links. The syntaxes are
syntaxes are as follow: as follow:
.. code-block:: php .. code-block:: php
@ -200,7 +200,7 @@ method or using the ``pageBreakBefore`` style of paragraph.
:: code-block:: php :: code-block:: php
$section->addPageBreak(); \\$section->addPageBreak();
Lists Lists
----- -----
@ -225,8 +225,8 @@ Parameters:
Advanced usage: Advanced usage:
You can also create your own numbering style by changing the ``$listStyle`` parameter You can also create your own numbering style by changing the
with the name of your numbering style. ``$listStyle`` parameter with the name of your numbering style.
.. code-block:: php .. code-block:: php
@ -246,11 +246,14 @@ with the name of your numbering style.
Level styles: Level styles:
- ``start`` Starting value - ``start`` Starting value
- ``format`` Numbering format bullet|decimal|upperRoman|lowerRoman|upperLetter|lowerLetter - ``format`` Numbering format
bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter
- ``restart`` Restart numbering level symbol - ``restart`` Restart numbering level symbol
- ``suffix`` Content between numbering symbol and paragraph text tab|space|nothing - ``suffix`` Content between numbering symbol and paragraph text
- ``text`` Numbering level text e.g. %1 for nonbullet or bullet character tab\|space\|nothing
- ``align`` Numbering symbol align left|center|right|both - ``text`` Numbering level text e.g. %1 for nonbullet or bullet
character
- ``align`` Numbering symbol align left\|center\|right\|both
- ``left`` See paragraph style - ``left`` See paragraph style
- ``hanging`` See paragraph style - ``hanging`` See paragraph style
- ``tabPos`` See paragraph style - ``tabPos`` See paragraph style
@ -326,15 +329,15 @@ See ``Sample_09_Tables.php`` for more code sample.
Images Images
------ ------
To add an image, use the ``addImage`` method to sections, headers, footers, To add an image, use the ``addImage`` method to sections, headers,
textruns, or table cells. footers, textruns, or table cells.
.. code-block:: php .. code-block:: php
$section->addImage($src, [$style]); $section->addImage($src, [$style]);
- `source` String path to a local image or URL of a remote image - source String path to a local image or URL of a remote image
- `styles` Array fo styles for the image. See below. - styles Array fo styles for the image. See below.
Examples: Examples:
@ -419,10 +422,10 @@ Options for ``$tocStyle``:
Footnotes & endnotes Footnotes & endnotes
-------------------- --------------------
You can create footnotes with ``addFootnote`` and endnotes with ``addEndnote`` You can create footnotes with ``addFootnote`` and endnotes with
in texts or textruns, but it's recommended to use textrun to have better layout. ``addEndnote`` in texts or textruns, but it's recommended to use textrun
You can use ``addText``, ``addLink``, ``addTextBreak``, ``addImage``, to have better layout. You can use ``addText``, ``addLink``,
``addObject`` on footnotes and endnotes. ``addTextBreak``, ``addImage``, ``addObject`` on footnotes and endnotes.
On textrun: On textrun:
@ -448,9 +451,9 @@ On text:
$footnote = $section->addFootnote(); $footnote = $section->addFootnote();
$footnote->addText('Footnote text.'); $footnote->addText('Footnote text.');
The footnote reference number will be displayed with decimal number starting The footnote reference number will be displayed with decimal number
from 1. This number use ``FooterReference`` style which you can redefine by starting from 1. This number use ``FooterReference`` style which you can
``addFontStyle`` method. Default value for this style is redefine by ``addFontStyle`` method. Default value for this style is
``array('superScript' => true)``; ``array('superScript' => true)``;
Checkboxes Checkboxes

View File

@ -67,7 +67,8 @@ This option sets
and and
`XMLWriter::setIndentString <http://www.php.net/manual/en/function.xmlwriter-set-indent-string.php>`__. `XMLWriter::setIndentString <http://www.php.net/manual/en/function.xmlwriter-set-indent-string.php>`__.
The default value of this option is ``true`` (compatible), which is The default value of this option is ``true`` (compatible), which is
`required for OpenOffice <https://github.com/PHPOffice/PHPWord/issues/103>`__ to `required for
OpenOffice <https://github.com/PHPOffice/PHPWord/issues/103>`__ to
render OOXML document correctly. You can set this option to ``false`` render OOXML document correctly. You can set this option to ``false``
during development to make the resulting XML file easier to read. during development to make the resulting XML file easier to read.

View File

@ -23,6 +23,7 @@ Format (RTF).
containers containers
elements elements
templates templates
writersreaders
recipes recipes
faq faq
credits credits

View File

@ -16,9 +16,9 @@ No Windows operating system is needed for usage because the resulting
DOCX, ODT, or RTF files can be opened by all major `word processing DOCX, ODT, or RTF files can be opened by all major `word processing
softwares <http://en.wikipedia.org/wiki/List_of_word_processors>`__. softwares <http://en.wikipedia.org/wiki/List_of_word_processors>`__.
PHPWord is an open source project licensed under LGPL. PHPWord is an open source project licensed under LGPL. PHPWord is `unit
PHPWord is `unit tested <https://travis-ci.org/PHPOffice/PHPWord>`__ to tested <https://travis-ci.org/PHPOffice/PHPWord>`__ to make sure that
make sure that the released versions are stable. the released versions are stable.
**Want to contribute?** `Fork **Want to contribute?** `Fork
us <https://github.com/PHPOffice/PHPWord/fork>`__ or us <https://github.com/PHPOffice/PHPWord/fork>`__ or
@ -62,122 +62,121 @@ Below are the supported features for each file formats.
Writers Writers
~~~~~~~ ~~~~~~~
+-------------------------------------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| Features | DOCX | ODT | RTF | HTML | PDF | | Features | | DOCX | ODT | RTF | HTML | PDF |
+=========================+=======================+========+=======+=======+=======+=======+ +===========================+======================+========+=======+=======+========+=======+
| **Document Properties** | Standard | ✓ | | | | | | **Document Properties** | Standard | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Extended | ✓ | | | | | | | Extended | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | UserDefined | ✓ | | | | | | | UserDefined | ✓ | | | | |
+-------------------------+-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ | | **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | | | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Title | ✓ | | | ✓ | ✓ | | | Title | ✓ | | | ✓ | ✓ |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Link | ✓ | | | ✓ | ✓ | | | Link | ✓ | | | ✓ | ✓ |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Preserve Text | ✓ | | | | | | | Preserve Text | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ | | | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Page Break | ✓ | | | | | | | Page Break | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | List | ✓ | | | | | | | List | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Table | ✓ | ✓ | | ✓ | ✓ | | | Table | ✓ | ✓ | | ✓ | ✓ |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Image | ✓ | ✓ | | ✓ | | | | Image | ✓ | ✓ | | ✓ | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Object | ✓ | | | | | | | Object | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Watermark | ✓ | | | | | | | Watermark | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Table of Contents | ✓ | | | | | | | Table of Contents | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Header | ✓ | | | | | | | Header | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Footer | ✓ | | | | | | | Footer | ✓ | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Footnote | ✓ | | | ✓ | | | | Footnote | ✓ | | | ✓ | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Endnote | ✓ | | | ✓ | | | | Endnote | ✓ | | | ✓ | |
+-------------------------+-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| **Graphs** | 2D basic graphs | | | | | | | **Graphs** | 2D basic graphs | | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | 2D advanced graphs | | | | | | | | 2D advanced graphs | | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | 3D graphs | | | | | | | | 3D graphs | | | | | |
+-------------------------+-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| **Math** | OMML support | | | | | | | **Math** | OMML support | | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | MathML support | | | | | | | | MathML support | | | | | |
+-------------------------+-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| **Bonus** | Encryption | | | | | | | **Bonus** | Encryption | | | | | |
+ +-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
| | Protection | | | | | | | | Protection | | | | | |
+-------------------------+-----------------------+--------+-------+-------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+--------+-------+
Readers Readers
~~~~~~~ ~~~~~~~
+-------------------------------------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| Features | DOCX | ODT | RTF | | Features | | DOCX | ODT | RTF |
+=========================+=======================+========+=======+=======+ +===========================+======================+========+=======+=======+
| **Document Properties** | Standard | ✓ | | | | **Document Properties** | Standard | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Extended | ✓ | | | | | Extended | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | UserDefined | ✓ | | | | | UserDefined | ✓ | | |
+-------------------------+-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| **Element Type** | Text | ✓ | | | | **Element Type** | Text | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Text Run | ✓ | | | | | Text Run | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Title | | | | | | Title | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Link | ✓ | | | | | Link | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Preserve Text | ✓ | | | | | Preserve Text | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Text Break | ✓ | | | | | Text Break | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Page Break | ✓ | | | | | Page Break | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | List | | | | | | List | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Table | ✓ | | | | | Table | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Image | | | | | | Image | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Object | | | | | | Object | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Watermark | | | | | | Watermark | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Table of Contents | | | | | | Table of Contents | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Header | ✓ | | | | | Header | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Footer | ✓ | | | | | Footer | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Footnote | ✓ | | | | | Footnote | ✓ | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Endnote | ✓ | | | | | Endnote | ✓ | | |
+-------------------------+-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| **Graphs** | 2D basic graphs | | | | | **Graphs** | 2D basic graphs | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | 2D advanced graphs | | | | | | 2D advanced graphs | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | 3D graphs | | | | | | 3D graphs | | | |
+-------------------------+-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| **Math** | OMML support | | | | | **Math** | OMML support | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | MathML support | | | | | | MathML support | | | |
+-------------------------+-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| **Bonus** | Encryption | | | | | **Bonus** | Encryption | | | |
+ +-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+
| | Protection | | | | | | Protection | | | |
+-------------------------+-----------------------+--------+-------+-------+ +---------------------------+----------------------+--------+-------+-------+

View File

@ -1,6 +1,6 @@
.. _setup: .. _setup:
Installing/Configuring Installing/configuring
====================== ======================
Requirements Requirements

View File

@ -39,6 +39,7 @@ Don't forget to change `code::` directive to `code-block::` in the resulting rst
- [OpenDocument](#opendocument) - [OpenDocument](#opendocument)
- [RTF](#rtf) - [RTF](#rtf)
- [HTML](#html) - [HTML](#html)
- [PDF](#pdf)
- [Frequently asked questions](#frequently-asked-questions) - [Frequently asked questions](#frequently-asked-questions)
- [References](#references) - [References](#references)
@ -80,11 +81,11 @@ Below are the supported features for each file formats.
### Writers ### Writers
| Features | | DOCX | ODT | RTF | HTML | PDF | | Features | | DOCX | ODT | RTF | HTML | PDF |
|---------------------|--------------------|------|-----|-----|------|-----| |-------------------------|--------------------|------|-----|-----|------|-----|
| Document Properties | Standard | ✓ | | | | | | **Document Properties** | Standard | ✓ | | | | |
| | Extended | ✓ | | | | | | | Extended | ✓ | | | | |
| | UserDefined | ✓ | | | | | | | UserDefined | ✓ | | | | |
| Element Type | Text | ✓ | ✓ | ✓ | ✓ | ✓ | | **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ |
| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | | | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ |
| | Title | ✓ | | | ✓ | ✓ | | | Title | ✓ | | | ✓ | ✓ |
| | Link | ✓ | | | ✓ | ✓ | | | Link | ✓ | | | ✓ | ✓ |
@ -101,22 +102,22 @@ Below are the supported features for each file formats.
| | Footer | ✓ | | | | | | | Footer | ✓ | | | | |
| | Footnote | ✓ | | | ✓ | | | | Footnote | ✓ | | | ✓ | |
| | Endnote | ✓ | | | ✓ | | | | Endnote | ✓ | | | ✓ | |
| Graphs | 2D basic graphs | | | | | | | **Graphs** | 2D basic graphs | | | | | |
| | 2D advanced graphs | | | | | | | | 2D advanced graphs | | | | | |
| | 3D graphs | | | | | | | | 3D graphs | | | | | |
| Math | OMML support | | | | | | | **Math** | OMML support | | | | | |
| | MathML support | | | | | | | | MathML support | | | | | |
| Bonus | Encryption | | | | | | | **Bonus** | Encryption | | | | | |
| | Protection | | | | | | | | Protection | | | | | |
### Readers ### Readers
| Features | | DOCX | ODT | RTF | | Features | | DOCX | ODT | RTF |
|---------------------|--------------------|------|-----|-----| |-------------------------|--------------------|------|-----|-----|
| Document Properties | Standard | ✓ | | | | **Document Properties** | Standard | ✓ | | |
| | Extended | ✓ | | | | | Extended | ✓ | | |
| | UserDefined | ✓ | | | | | UserDefined | ✓ | | |
| Element Type | Text | ✓ | | | | **Element Type** | Text | ✓ | | |
| | Text Run | ✓ | | | | | Text Run | ✓ | | |
| | Title | ✓ | | | | | Title | ✓ | | |
| | Link | ✓ | | | | | Link | ✓ | | |
@ -133,12 +134,12 @@ Below are the supported features for each file formats.
| | Footer | ✓ | | | | | Footer | ✓ | | |
| | Footnote | ✓ | | | | | Footnote | ✓ | | |
| | Endnote | ✓ | | | | | Endnote | ✓ | | |
| Graphs | 2D basic graphs | | | | | **Graphs** | 2D basic graphs | | | |
| | 2D advanced graphs | | | | | | 2D advanced graphs | | | |
| | 3D graphs | | | | | | 3D graphs | | | |
| Math | OMML support | | | | | **Math** | OMML support | | | |
| | MathML support | | | | | | MathML support | | | |
| Bonus | Encryption | | | | | **Bonus** | Encryption | | | |
| | Protection | | | | | | Protection | | | |
# Installing/configuring # Installing/configuring
@ -897,6 +898,10 @@ To be completed.
To be completed. To be completed.
## PDF
To be completed.
# Frequently asked questions # Frequently asked questions
## Is this the same with PHPWord that I found in CodePlex? ## Is this the same with PHPWord that I found in CodePlex?

View File

@ -19,8 +19,9 @@ Example:
$template->setValue('Name', 'Somebody someone'); $template->setValue('Name', 'Somebody someone');
$template->setValue('Street', 'Coming-Undone-Street 32'); $template->setValue('Street', 'Coming-Undone-Street 32');
See ``Sample_07_TemplateCloneRow.php`` for example on how to create multirow See ``Sample_07_TemplateCloneRow.php`` for example on how to create
from a single row in a template by using ``cloneRow``. multirow from a single row in a template by using ``cloneRow``.
See ``Sample_23_TemplateBlock.php`` for example on how to clone a block of See ``Sample_23_TemplateBlock.php`` for example on how to clone a block
text using ``cloneBlock`` and delete a block of text using ``deleteBlock``. of text using ``cloneBlock`` and delete a block of text using
``deleteBlock``.

110
docs/writersreaders.rst Normal file
View File

@ -0,0 +1,110 @@
.. _writersreaders:
Writers & readers
=================
OOXML
-----
The package of OOXML document consists of the following files.
- \_rels/
- .rels
- docProps/
- app.xml
- core.xml
- custom.xml
- word/
- rels/
- document.rels.xml
- media/
- theme/
- theme1.xml
- document.xml
- fontTable.xml
- numbering.xml
- settings.xml
- styles.xml
- webSettings.xml
- [Content\_Types].xml
OpenDocument
------------
Package
~~~~~~~
The package of OpenDocument document consists of the following files.
- META-INF/
- manifest.xml
- Pictures/
- content.xml
- meta.xml
- styles.xml
content.xml
~~~~~~~~~~~
The structure of ``content.xml`` is described below.
- office:document-content
- office:font-facedecls
- office:automatic-styles
- office:body
- office:text
- draw:\*
- office:forms
- table:table
- text:list
- text:numbered-paragraph
- text:p
- text:table-of-contents
- text:section
- office:chart
- office:image
- office:drawing
styles.xml
~~~~~~~~~~
The structure of ``styles.xml`` is described below.
- office:document-styles
- office:styles
- office:automatic-styles
- office:master-styles
- office:master-page
RTF
---
To be completed.
HTML
----
To be completed.
PDF
---
To be completed.

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ruleset name="PHPPowerPoint mess detector ruleset" <ruleset name="PHPWord mess detector ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"