From 1635c83b5db7bf8d89b5176cba3a4fef3e7f1dca Mon Sep 17 00:00:00 2001 From: Ivan Lanin Date: Sat, 26 Apr 2014 14:21:52 +0700 Subject: [PATCH] Docs: Update documentation --- docs/elements.rst | 131 ++++++++++----------- docs/general.rst | 3 +- docs/index.rst | 1 + docs/intro.rst | 235 +++++++++++++++++++------------------- docs/setup.rst | 2 +- docs/src/documentation.md | 121 ++++++++++---------- docs/templates.rst | 9 +- docs/writersreaders.rst | 110 ++++++++++++++++++ phpmd.xml | 2 +- 9 files changed, 367 insertions(+), 247 deletions(-) create mode 100644 docs/writersreaders.rst diff --git a/docs/elements.rst b/docs/elements.rst index b6842b65..2ef5619c 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -3,62 +3,62 @@ Elements ======== -Below are the matrix of element availability in each container. The column shows -the containers while the rows lists the elements. +Below are the matrix of element availability in each container. The +column shows the containers while the rows lists the elements. -+-----+---------------+---------+--------+--------+------+----------+----------+ -| Num | Element | Section | Header | Footer | Cell | Text Run | Footnote | -+=====+===============+=========+========+========+======+==========+==========+ -| 1 | Text | v | v | v | v | v | v | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 2 | Text Run | v | v | v | v | \- | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 3 | Link | v | v | v | v | v | v | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 4 | Title | v | ? | ? | ? | ? | ? | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 5 | Preserve Text | ? | v | v | v\* | ? | ? | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 6 | Text Break | v | v | v | v | v | v | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 7 | Page Break | v | \- | \- | \- | \- | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 8 | List | v | v | v | v | \- | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 9 | Table | v | v | v | ? | \- | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 10 | Image | v | v | v | v | v | v | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 11 | Watermark | \- | v | \- | \- | \- | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 12 | Object | v | v | v | v | v | v | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 13 | TOC | v | \- | \- | \- | \- | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 14 | Footnote | v | \- | \- | v\*\*| v\*\* | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 15 | Endnote | v | \- | \- | v\*\*| v\*\* | \- | -+-----+---------------+---------+--------+--------+------+----------+----------+ -| 16 | CheckBox | v | v | v | v | ? | ? | -+-----+---------------+---------+--------+--------+------+----------+----------+ ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| Num | Element | Section | Header | Footer | Cell | Text Run | Footnote | ++=======+=================+===========+==========+==========+=========+============+============+ +| 1 | Text | v | v | v | v | v | v | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 2 | Text Run | v | v | v | v | - | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 3 | Link | v | v | v | v | v | v | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 4 | Title | v | ? | ? | ? | ? | ? | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 5 | Preserve Text | ? | v | v | v\* | ? | ? | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 6 | Text Break | v | v | v | v | v | v | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 7 | Page Break | v | - | - | - | - | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 8 | List | v | v | v | v | - | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 9 | Table | v | v | v | ? | - | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 10 | Image | v | v | v | v | v | v | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 11 | Watermark | - | v | - | - | - | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 12 | Object | v | v | v | v | v | v | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 13 | TOC | v | - | - | - | - | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 14 | Footnote | v | - | - | v\*\* | v\*\* | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 15 | Endnote | v | - | - | v\*\* | v\*\* | - | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ +| 16 | CheckBox | v | v | v | v | ? | ? | ++-------+-----------------+-----------+----------+----------+---------+------------+------------+ Legend: -- ``v`` Available -- ``v*`` Available only when inside header/footer -- ``v**`` Available only when inside section -- ``-`` Not available -- ``?`` Should be available +- ``v`` Available +- ``v*`` Available only when inside header/footer +- ``v**`` Available only when inside section +- ``-`` Not available +- ``?`` Should be available Texts ----- Text can be added by using ``addText`` and ``addTextRun`` method. ``addText`` is used for creating simple paragraphs that only contain -texts with the same style. ``addTextRun`` is used for creating -complex paragraphs that contain text with different style (some bold, -other italics, etc) or other elements, e.g. images or links. The -syntaxes are as follow: +texts with the same style. ``addTextRun`` is used for creating complex +paragraphs that contain text with different style (some bold, other +italics, etc) or other elements, e.g. images or links. The syntaxes are +as follow: .. code-block:: php @@ -200,7 +200,7 @@ method or using the ``pageBreakBefore`` style of paragraph. :: code-block:: php - $section->addPageBreak(); + \\$section->addPageBreak(); Lists ----- @@ -225,8 +225,8 @@ Parameters: Advanced usage: -You can also create your own numbering style by changing the ``$listStyle`` parameter -with the name of your numbering style. +You can also create your own numbering style by changing the +``$listStyle`` parameter with the name of your numbering style. .. code-block:: php @@ -246,11 +246,14 @@ with the name of your numbering style. Level styles: - ``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 -- ``suffix`` Content between numbering symbol and paragraph text tab|space|nothing -- ``text`` Numbering level text e.g. %1 for nonbullet or bullet character -- ``align`` Numbering symbol align left|center|right|both +- ``suffix`` Content between numbering symbol and paragraph text + tab\|space\|nothing +- ``text`` Numbering level text e.g. %1 for nonbullet or bullet + character +- ``align`` Numbering symbol align left\|center\|right\|both - ``left`` See paragraph style - ``hanging`` See paragraph style - ``tabPos`` See paragraph style @@ -326,15 +329,15 @@ See ``Sample_09_Tables.php`` for more code sample. Images ------ -To add an image, use the ``addImage`` method to sections, headers, footers, -textruns, or table cells. +To add an image, use the ``addImage`` method to sections, headers, +footers, textruns, or table cells. .. code-block:: php $section->addImage($src, [$style]); -- `source` String path to a local image or URL of a remote image -- `styles` Array fo styles for the image. See below. +- source String path to a local image or URL of a remote image +- styles Array fo styles for the image. See below. Examples: @@ -419,10 +422,10 @@ Options for ``$tocStyle``: Footnotes & endnotes -------------------- -You can create footnotes with ``addFootnote`` and endnotes with ``addEndnote`` -in texts or textruns, but it's recommended to use textrun to have better layout. -You can use ``addText``, ``addLink``, ``addTextBreak``, ``addImage``, -``addObject`` on footnotes and endnotes. +You can create footnotes with ``addFootnote`` and endnotes with +``addEndnote`` in texts or textruns, but it's recommended to use textrun +to have better layout. You can use ``addText``, ``addLink``, +``addTextBreak``, ``addImage``, ``addObject`` on footnotes and endnotes. On textrun: @@ -448,9 +451,9 @@ On text: $footnote = $section->addFootnote(); $footnote->addText('Footnote text.'); -The footnote reference number will be displayed with decimal number starting -from 1. This number use ``FooterReference`` style which you can redefine by -``addFontStyle`` method. Default value for this style is +The footnote reference number will be displayed with decimal number +starting from 1. This number use ``FooterReference`` style which you can +redefine by ``addFontStyle`` method. Default value for this style is ``array('superScript' => true)``; Checkboxes diff --git a/docs/general.rst b/docs/general.rst index c7e55d5a..f08e29ba 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -67,7 +67,8 @@ This option sets and `XMLWriter::setIndentString `__. The default value of this option is ``true`` (compatible), which is -`required for OpenOffice `__ to +`required for +OpenOffice `__ to render OOXML document correctly. You can set this option to ``false`` during development to make the resulting XML file easier to read. diff --git a/docs/index.rst b/docs/index.rst index 700694a5..fd3a3fa9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,6 +23,7 @@ Format (RTF). containers elements templates + writersreaders recipes faq credits diff --git a/docs/intro.rst b/docs/intro.rst index 2c5d413d..48b4c092 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -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 softwares `__. -PHPWord is an open source project licensed under LGPL. -PHPWord is `unit tested `__ to -make sure that the released versions are stable. +PHPWord is an open source project licensed under LGPL. PHPWord is `unit +tested `__ to make sure that +the released versions are stable. **Want to contribute?** `Fork us `__ or @@ -62,122 +62,121 @@ Below are the supported features for each file formats. Writers ~~~~~~~ -+-------------------------------------------------+--------+-------+-------+-------+-------+ -| Features | DOCX | ODT | RTF | HTML | PDF | -+=========================+=======================+========+=======+=======+=======+=======+ -| **Document Properties** | Standard | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Extended | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | UserDefined | ✓ | | | | | -+-------------------------+-----------------------+--------+-------+-------+-------+-------+ -| **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Title | ✓ | | | ✓ | ✓ | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Link | ✓ | | | ✓ | ✓ | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Preserve Text | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Page Break | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | List | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Table | ✓ | ✓ | | ✓ | ✓ | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Image | ✓ | ✓ | | ✓ | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Object | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Watermark | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Table of Contents | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Header | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Footer | ✓ | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Footnote | ✓ | | | ✓ | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Endnote | ✓ | | | ✓ | | -+-------------------------+-----------------------+--------+-------+-------+-------+-------+ -| **Graphs** | 2D basic graphs | | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | 2D advanced graphs | | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | 3D graphs | | | | | | -+-------------------------+-----------------------+--------+-------+-------+-------+-------+ -| **Math** | OMML support | | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | MathML support | | | | | | -+-------------------------+-----------------------+--------+-------+-------+-------+-------+ -| **Bonus** | Encryption | | | | | | -+ +-----------------------+--------+-------+-------+-------+-------+ -| | Protection | | | | | | -+-------------------------+-----------------------+--------+-------+-------+-------+-------+ - ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| Features | | DOCX | ODT | RTF | HTML | PDF | ++===========================+======================+========+=======+=======+========+=======+ +| **Document Properties** | Standard | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Extended | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | UserDefined | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Title | ✓ | | | ✓ | ✓ | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Link | ✓ | | | ✓ | ✓ | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Preserve Text | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Page Break | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | List | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Table | ✓ | ✓ | | ✓ | ✓ | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Image | ✓ | ✓ | | ✓ | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Object | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Watermark | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Table of Contents | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Header | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Footer | ✓ | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Footnote | ✓ | | | ✓ | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Endnote | ✓ | | | ✓ | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| **Graphs** | 2D basic graphs | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | 2D advanced graphs | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | 3D graphs | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| **Math** | OMML support | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | MathML support | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| **Bonus** | Encryption | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ +| | Protection | | | | | | ++---------------------------+----------------------+--------+-------+-------+--------+-------+ Readers ~~~~~~~ -+-------------------------------------------------+--------+-------+-------+ -| Features | DOCX | ODT | RTF | -+=========================+=======================+========+=======+=======+ -| **Document Properties** | Standard | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Extended | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | UserDefined | ✓ | | | -+-------------------------+-----------------------+--------+-------+-------+ -| **Element Type** | Text | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Text Run | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Title | | | | -+ +-----------------------+--------+-------+-------+ -| | Link | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Preserve Text | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Text Break | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Page Break | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | List | | | | -+ +-----------------------+--------+-------+-------+ -| | Table | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Image | | | | -+ +-----------------------+--------+-------+-------+ -| | Object | | | | -+ +-----------------------+--------+-------+-------+ -| | Watermark | | | | -+ +-----------------------+--------+-------+-------+ -| | Table of Contents | | | | -+ +-----------------------+--------+-------+-------+ -| | Header | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Footer | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Footnote | ✓ | | | -+ +-----------------------+--------+-------+-------+ -| | Endnote | ✓ | | | -+-------------------------+-----------------------+--------+-------+-------+ -| **Graphs** | 2D basic graphs | | | | -+ +-----------------------+--------+-------+-------+ -| | 2D advanced graphs | | | | -+ +-----------------------+--------+-------+-------+ -| | 3D graphs | | | | -+-------------------------+-----------------------+--------+-------+-------+ -| **Math** | OMML support | | | | -+ +-----------------------+--------+-------+-------+ -| | MathML support | | | | -+-------------------------+-----------------------+--------+-------+-------+ -| **Bonus** | Encryption | | | | -+ +-----------------------+--------+-------+-------+ -| | Protection | | | | -+-------------------------+-----------------------+--------+-------+-------+ ++---------------------------+----------------------+--------+-------+-------+ +| Features | | DOCX | ODT | RTF | ++===========================+======================+========+=======+=======+ +| **Document Properties** | Standard | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Extended | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | UserDefined | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| **Element Type** | Text | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Text Run | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Title | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Link | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Preserve Text | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Text Break | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Page Break | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | List | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Table | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Image | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Object | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Watermark | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Table of Contents | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Header | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Footer | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Footnote | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Endnote | ✓ | | | ++---------------------------+----------------------+--------+-------+-------+ +| **Graphs** | 2D basic graphs | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | 2D advanced graphs | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | 3D graphs | | | | ++---------------------------+----------------------+--------+-------+-------+ +| **Math** | OMML support | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | MathML support | | | | ++---------------------------+----------------------+--------+-------+-------+ +| **Bonus** | Encryption | | | | ++---------------------------+----------------------+--------+-------+-------+ +| | Protection | | | | ++---------------------------+----------------------+--------+-------+-------+ diff --git a/docs/setup.rst b/docs/setup.rst index 3c01eb94..e5d61b4e 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -1,6 +1,6 @@ .. _setup: -Installing/Configuring +Installing/configuring ====================== Requirements diff --git a/docs/src/documentation.md b/docs/src/documentation.md index 337b1d79..7766d66f 100644 --- a/docs/src/documentation.md +++ b/docs/src/documentation.md @@ -39,6 +39,7 @@ Don't forget to change `code::` directive to `code-block::` in the resulting rst - [OpenDocument](#opendocument) - [RTF](#rtf) - [HTML](#html) + - [PDF](#pdf) - [Frequently asked questions](#frequently-asked-questions) - [References](#references) @@ -79,67 +80,67 @@ Below are the supported features for each file formats. ### Writers -| Features | | DOCX | ODT | RTF | HTML | PDF | -|---------------------|--------------------|------|-----|-----|------|-----| -| Document Properties | Standard | ✓ | | | | | -| | Extended | ✓ | | | | | -| | UserDefined | ✓ | | | | | -| Element Type | Text | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Title | ✓ | | | ✓ | ✓ | -| | Link | ✓ | | | ✓ | ✓ | -| | Preserve Text | ✓ | | | | | -| | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Page Break | ✓ | | | | | -| | List | ✓ | | | | | -| | Table | ✓ | ✓ | | ✓ | ✓ | -| | Image | ✓ | ✓ | | ✓ | | -| | Object | ✓ | | | | | -| | Watermark | ✓ | | | | | -| | Table of Contents | ✓ | | | | | -| | Header | ✓ | | | | | -| | Footer | ✓ | | | | | -| | Footnote | ✓ | | | ✓ | | -| | Endnote | ✓ | | | ✓ | | -| Graphs | 2D basic graphs | | | | | | -| | 2D advanced graphs | | | | | | -| | 3D graphs | | | | | | -| Math | OMML support | | | | | | -| | MathML support | | | | | | -| Bonus | Encryption | | | | | | -| | Protection | | | | | | +| Features | | DOCX | ODT | RTF | HTML | PDF | +|-------------------------|--------------------|------|-----|-----|------|-----| +| **Document Properties** | Standard | ✓ | | | | | +| | Extended | ✓ | | | | | +| | UserDefined | ✓ | | | | | +| **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ | +| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | +| | Title | ✓ | | | ✓ | ✓ | +| | Link | ✓ | | | ✓ | ✓ | +| | Preserve Text | ✓ | | | | | +| | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ | +| | Page Break | ✓ | | | | | +| | List | ✓ | | | | | +| | Table | ✓ | ✓ | | ✓ | ✓ | +| | Image | ✓ | ✓ | | ✓ | | +| | Object | ✓ | | | | | +| | Watermark | ✓ | | | | | +| | Table of Contents | ✓ | | | | | +| | Header | ✓ | | | | | +| | Footer | ✓ | | | | | +| | Footnote | ✓ | | | ✓ | | +| | Endnote | ✓ | | | ✓ | | +| **Graphs** | 2D basic graphs | | | | | | +| | 2D advanced graphs | | | | | | +| | 3D graphs | | | | | | +| **Math** | OMML support | | | | | | +| | MathML support | | | | | | +| **Bonus** | Encryption | | | | | | +| | Protection | | | | | | ### Readers -| Features | | DOCX | ODT | RTF | -|---------------------|--------------------|------|-----|-----| -| Document Properties | Standard | ✓ | | | -| | Extended | ✓ | | | -| | UserDefined | ✓ | | | -| Element Type | Text | ✓ | | | -| | Text Run | ✓ | | | -| | Title | ✓ | | | -| | Link | ✓ | | | -| | Preserve Text | ✓ | | | -| | Text Break | ✓ | | | -| | Page Break | ✓ | | | -| | List | ✓ | | | -| | Table | ✓ | | | -| | Image | ✓ | | | -| | Object | | | | -| | Watermark | | | | -| | Table of Contents | | | | -| | Header | ✓ | | | -| | Footer | ✓ | | | -| | Footnote | ✓ | | | -| | Endnote | ✓ | | | -| Graphs | 2D basic graphs | | | | -| | 2D advanced graphs | | | | -| | 3D graphs | | | | -| Math | OMML support | | | | -| | MathML support | | | | -| Bonus | Encryption | | | | -| | Protection | | | | +| Features | | DOCX | ODT | RTF | +|-------------------------|--------------------|------|-----|-----| +| **Document Properties** | Standard | ✓ | | | +| | Extended | ✓ | | | +| | UserDefined | ✓ | | | +| **Element Type** | Text | ✓ | | | +| | Text Run | ✓ | | | +| | Title | ✓ | | | +| | Link | ✓ | | | +| | Preserve Text | ✓ | | | +| | Text Break | ✓ | | | +| | Page Break | ✓ | | | +| | List | ✓ | | | +| | Table | ✓ | | | +| | Image | ✓ | | | +| | Object | | | | +| | Watermark | | | | +| | Table of Contents | | | | +| | Header | ✓ | | | +| | Footer | ✓ | | | +| | Footnote | ✓ | | | +| | Endnote | ✓ | | | +| **Graphs** | 2D basic graphs | | | | +| | 2D advanced graphs | | | | +| | 3D graphs | | | | +| **Math** | OMML support | | | | +| | MathML support | | | | +| **Bonus** | Encryption | | | | +| | Protection | | | | # Installing/configuring @@ -897,6 +898,10 @@ To be completed. To be completed. +## PDF + +To be completed. + # Frequently asked questions ## Is this the same with PHPWord that I found in CodePlex? diff --git a/docs/templates.rst b/docs/templates.rst index ec9c7126..b1d9d205 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -19,8 +19,9 @@ Example: $template->setValue('Name', 'Somebody someone'); $template->setValue('Street', 'Coming-Undone-Street 32'); -See ``Sample_07_TemplateCloneRow.php`` for example on how to create multirow -from a single row in a template by using ``cloneRow``. +See ``Sample_07_TemplateCloneRow.php`` for example on how to create +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 -text using ``cloneBlock`` and delete a block of text using ``deleteBlock``. +See ``Sample_23_TemplateBlock.php`` for example on how to clone a block +of text using ``cloneBlock`` and delete a block of text using +``deleteBlock``. diff --git a/docs/writersreaders.rst b/docs/writersreaders.rst new file mode 100644 index 00000000..34a0805a --- /dev/null +++ b/docs/writersreaders.rst @@ -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. diff --git a/phpmd.xml b/phpmd.xml index 29b67bc4..c1ebb770 100644 --- a/phpmd.xml +++ b/phpmd.xml @@ -1,5 +1,5 @@ -