Skip to content

PR Version 0.10 #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 185 commits into from
May 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
ad58e72
Add some tests to new wrapping image
brunocasado Jan 20, 2014
b9244d6
Add PCLZIP alternative to ZipArchive
hskrtich Mar 16, 2014
258c9c6
Added addCheckBox() function
ozilion Mar 20, 2014
27840ab
Font-style addition: bgColor
Mar 24, 2014
e990c77
Added height rules for table row
Mar 24, 2014
e2cdf43
"php://output" content-length + tmpfile location
Mar 24, 2014
6796883
added samples for bgColor and tableRowHeightRules
Mar 24, 2014
a6568e9
Proposed simplified docblock
ivanlanin Mar 26, 2014
ab6503e
Test folder updated
ozilion Mar 27, 2014
b3c5a76
Update Base.php
gianisimone Mar 27, 2014
f6ca403
Merge remote-tracking branch 'upstream/develop' into simplified-docblock
ivanlanin Mar 27, 2014
e6a26dd
Simplify all classes docblock
ivanlanin Mar 27, 2014
10df072
Merge pull request #179 from ivanlanin/simplified-docblock
ivanlanin Mar 27, 2014
a8da5b1
Get image dimensions without EXIF extension
andrew-kzoo Mar 27, 2014
160c2c7
Merge branch 'master' of https://github.com/gianis6/PHPWord into gian…
ivanlanin Mar 28, 2014
de28693
Merge pull request #184 from andrew-kzoo/fix-exif-imagetype
ivanlanin Mar 28, 2014
2d178a6
Update CHANGELOG.md
ivanlanin Mar 28, 2014
88be3c9
TOC Depth filter function added
Mar 28, 2014
7a42431
Unit tests enhancement
ivanlanin Mar 28, 2014
92588cc
Fix variable for MediaTest
ivanlanin Mar 28, 2014
e81b2d0
Merge and modify 'pclzip' of https://github.com/bskrtich/PHPWord to m…
ivanlanin Mar 28, 2014
338ceab
Merge and modify 'pclzip' of https://github.com/bskrtich/PHPWord to m…
ivanlanin Mar 28, 2014
86274aa
Merge branch '#140-bskrtich-pclzip' of github.com:ivanlanin/PHPWord i…
ivanlanin Mar 28, 2014
8363ee2
table row height rule moved to rowStyle (ivanlanin)
Mar 28, 2014
9faaa1b
reverted table/row
Mar 28, 2014
772017d
empty space remove
Mar 28, 2014
255af43
Bugfix for footnote reference number and additional feature to insert…
ivanlanin Mar 28, 2014
612ad85
changed heightRule string to exactHeight bool
Mar 28, 2014
c91d6b6
Writer unit test enhancements
ivanlanin Mar 29, 2014
01f3f40
#168 Merge branch 'develop' of https://github.com/jcarignan/PHPWord
ivanlanin Mar 29, 2014
970cb32
Fix deprecated method, unused parts, initial definition, and @method …
ivanlanin Mar 29, 2014
42b12db
#156 Merge branch 'master' of https://github.com/ozilion/PHPWord
ivanlanin Mar 29, 2014
f0803ef
#156 Merge branch 'master' of https://github.com/ozilion/PHPWord
ivanlanin Mar 29, 2014
1977685
#156 Merge branch 'master' of https://github.com/ozilion/PHPWord
ivanlanin Mar 29, 2014
05a4b95
Unit test enhancements
ivanlanin Mar 30, 2014
0e2f476
Docblock updates
ivanlanin Mar 30, 2014
4127860
Refactor writers and readers
ivanlanin Mar 30, 2014
bf5eed4
List of authors has been updated in "composer.json".
Mar 30, 2014
acba6b4
Refactoring & remove underscore prefix from method and property names
ivanlanin Mar 30, 2014
4140782
Namespace adjustments on writer classes
ivanlanin Mar 30, 2014
f911f5c
Namespace alias
ivanlanin Mar 30, 2014
13b6092
Merge remote-tracking branch 'upstream/develop' into refactor-writer
ivanlanin Mar 30, 2014
99c25c3
Namespace updates
ivanlanin Mar 30, 2014
45b0baf
Refactor writer classes
ivanlanin Mar 30, 2014
2d72446
Merge branch 'develop' of github.com:ivanlanin/PHPWord into develop
ivanlanin Mar 30, 2014
71b60e9
Merge branch 'develop' into #140-bskrtich-pclzip
ivanlanin Mar 30, 2014
9d3c2e8
Update changelog and documentation for PCLZip
ivanlanin Mar 30, 2014
e405bf2
Merge pull request #185 from ivanlanin/#140-bskrtich-pclzip
ivanlanin Mar 30, 2014
13e5ca0
#160 Refactor folders: Element, Container, and Exception
ivanlanin Mar 30, 2014
b7fd623
Re-indent with spaces TOC Depth filter
Mar 31, 2014
2bf0bbb
Container abstract class
ivanlanin Mar 31, 2014
faba46c
Extends `Container` abstract class into `Footnote`, `TextRun`, and `C…
ivanlanin Mar 31, 2014
07be5ea
Adding more functionalities to containers:
ivanlanin Apr 1, 2014
6f7b97e
Add unit tests for refactoring results
ivanlanin Apr 1, 2014
763de34
Add support for document headers and footers to Template class.
Apr 1, 2014
4f514d2
Load any number of headers and footers
Apr 1, 2014
495930b
Add element availability matrix and enable `addObject` in footnote an…
ivanlanin Apr 2, 2014
a2a0039
Remove HashTable and all related properties/methods. PHPWord doesn't …
ivanlanin Apr 2, 2014
f0ee25f
Deprecate `createSection` in favor of `addSection`
ivanlanin Apr 2, 2014
06ba9e7
Make one level Element folder structure (move Cell and Row up one level)
ivanlanin Apr 2, 2014
51a8628
Merge #190, reorder methods (public, protected, private), and add exa…
ivanlanin Apr 2, 2014
237625d
Merge branch 'develop' into #160-element-container
ivanlanin Apr 2, 2014
04e6dbc
Remove some duplication on Word2007 writers
ivanlanin Apr 2, 2014
637c9fc
Create new Element abstract class
ivanlanin Apr 3, 2014
1ebd26d
Fix some test error
ivanlanin Apr 3, 2014
7c549f5
DocBlock and use fixes
ivanlanin Apr 3, 2014
1751ab0
Remove unused ZipStreamWrapper.php and cleanup some scripts
ivanlanin Apr 3, 2014
0fc1a06
Merge all Word2007 relationships writer
ivanlanin Apr 3, 2014
e800d96
added clone, delete, replace block #165
Apr 4, 2014
b75403f
Refactor Media, addObject to header and footer
ivanlanin Apr 3, 2014
d7c18fe
Move OOXML specific feature from Media to Word2007\Base
ivanlanin Apr 4, 2014
dd9faae
Add Media::reset(), Style::reset(), Footnote::reset(), and TOC::reset()
ivanlanin Apr 4, 2014
6aa7354
Fix failed test
ivanlanin Apr 4, 2014
03934af
Refactor header/footer and media model
ivanlanin Apr 5, 2014
61885e0
Merge branch 'develop' of https://github.com/diego-vieira/PHPWord int…
ivanlanin Apr 5, 2014
a84171d
Merge branch 'master' of https://github.com/Pyreweb/PHPWord into #189…
ivanlanin Apr 5, 2014
eb7f0a3
Merge remote-tracking branch 'upstream/develop' into #189-pyreweb
ivanlanin Apr 5, 2014
14664d3
Update changelog and documentation
ivanlanin Apr 5, 2014
76205c6
Update TOC tests
ivanlanin Apr 5, 2014
50e9e0f
Merge branch 'develop' into #160-element-container
ivanlanin Apr 5, 2014
8d2c6eb
Fix TOCTest error
ivanlanin Apr 6, 2014
a218202
Enhance unit tests
ivanlanin Apr 6, 2014
177c523
Remove underscore prefix from all private properties name
ivanlanin Apr 6, 2014
d1d1e6b
Reader: Ability to read tables, links, preserve text, and text break
ivanlanin Apr 7, 2014
b594e32
Move container files
ivanlanin Apr 7, 2014
f1108c4
Add Abstract- prefix and -Interface suffix for corresponding classes
ivanlanin Apr 7, 2014
dadfc29
Merge branch '#160-element-container' into xml-reader
ivanlanin Apr 7, 2014
3ef0f41
New `Style\AbstractStyle` and 'ODText\Base`
ivanlanin Apr 7, 2014
cd2dba0
Element inheritance refinements
ivanlanin Apr 7, 2014
6456255
Merge branch '#160-element-container' into xml-reader
ivanlanin Apr 8, 2014
cf7263b
Merge pull request #187 from ivanlanin/#160-element-container
ivanlanin Apr 8, 2014
833dfea
Keep image aspect ratio if only 1 dimension styled
Apr 8, 2014
cdb3a20
[FIXED] Namespacing in documentation.
Apr 8, 2014
191d37b
Leading backslashes in global function/constant calls were removed.
Apr 8, 2014
f049c48
[FIXED] Namespacing.
Apr 8, 2014
9c9f7eb
NULLs changed to lowercase to meet PSR.
Apr 8, 2014
2cdad4b
Reader: Ability to read header, footer, footnotes, link, preservetext…
ivanlanin Apr 8, 2014
db129b4
Update footnote unit tests
ivanlanin Apr 9, 2014
0ccea96
Merge remote-tracking branch 'upstream/develop' into xml-reader
ivanlanin Apr 9, 2014
3841867
Fix unit test error
ivanlanin Apr 9, 2014
f837381
Ability to add Endnotes
ivanlanin Apr 9, 2014
5b4ed10
[FIXED] Dockblock for https://github.com/PHPOffice/PHPWord/pull/187
Apr 10, 2014
4849bb2
[FIXED] Dockblocks for https://github.com/PHPOffice/PHPWord/pull/187.
Apr 10, 2014
47669f5
Ability to create custom list #10 and to read list definition from DOCX
ivanlanin Apr 11, 2014
39a5e8c
Merge branch 'numbering' into develop
ivanlanin Apr 11, 2014
297eeaa
Documentation for new ListItem feature
ivanlanin Apr 11, 2014
42167f8
Fix documentation format and some type check
ivanlanin Apr 11, 2014
a7567f7
Merge pull request #198 from ivanlanin/develop
ivanlanin Apr 11, 2014
ae652a6
Update upcoming version number to 0.10.0 as per #178
ivanlanin Apr 11, 2014
a3a9af5
Additional unit tests and some code deduplication
ivanlanin Apr 11, 2014
a5c815d
ODT: Basic table writing support
ivanlanin Apr 11, 2014
fb35a5f
Change object name
ivanlanin Apr 11, 2014
d387552
Merge pull request #201 from ivanlanin/develop
ivanlanin Apr 11, 2014
59e623b
Fixes #195 : Update general.rst
Progi1984 Apr 11, 2014
b40218d
Add some unit tests for Shared & Element (100%!) - @Progi1984
Progi1984 Apr 11, 2014
47956b0
Code formatting and some more tests
ivanlanin Apr 12, 2014
9bb5655
Unit test for AbstractStyle
ivanlanin Apr 12, 2014
89f4288
Merge branch 'master' of https://github.com/brunocasado/PHPWord into …
ivanlanin Apr 12, 2014
a5b5e0c
Update CHANGELOG
ivanlanin Apr 13, 2014
abc67ed
Merge branch 'develop' of https://github.com/japonicus/PHPWord into d…
ivanlanin Apr 13, 2014
e78489b
Update unit test and changelog
ivanlanin Apr 13, 2014
19a69e2
Basic HTML writer
ivanlanin Apr 12, 2014
15ca8f2
Merge branch 'develop' into html
ivanlanin Apr 13, 2014
5a01927
Update changelog
ivanlanin Apr 13, 2014
d54d47d
Merge pull request #203 from ivanlanin/html
ivanlanin Apr 13, 2014
580a61a
Basic PDF Writer #68
ivanlanin Apr 13, 2014
413f5e8
Change PDF Core to AbstractRenderer
ivanlanin Apr 14, 2014
6eb2c66
Merge pull request #204 from ivanlanin/pdf-writer
ivanlanin Apr 14, 2014
3cb6d86
Unit tests for PDF writer; Enable `zip://zipFilename#archiveFilename`…
ivanlanin Apr 16, 2014
20b363f
Remove local path from sample and add DomPDF in `composer.json` `requ…
ivanlanin Apr 16, 2014
04b14ea
Fix `Writer\Word2007\BaseTest` error
ivanlanin Apr 16, 2014
9c738f7
Refactor Element\Image and some samples
ivanlanin Apr 16, 2014
2829fd8
Enable image in HTML writer
ivanlanin Apr 16, 2014
406534c
Fix unit test error
ivanlanin Apr 16, 2014
3d8ae04
Set image size and additional tests for HTML writer
ivanlanin Apr 16, 2014
6612ee8
Update composer.json and .travis.yml as per #205
ivanlanin Apr 16, 2014
1ed13cc
Include dompdf version
ivanlanin Apr 16, 2014
52b3506
HTML Writer: Enable footnotes and endnotes
ivanlanin Apr 16, 2014
898be23
Merge pull request #205 from ivanlanin/develop
ivanlanin Apr 16, 2014
b419d64
Change Application DocProps to "PHPWord"
ivanlanin Apr 16, 2014
2c1c1ea
[IMPROVED] Dockblocks as per https://github.com/PHPOffice/PHPWord/pul…
Apr 16, 2014
db1d89a
Merge remote-tracking branch 'origin/develop' into develop
Apr 16, 2014
b670a1e
DOCX Writer: Create `word/settings.xml` and `word/webSettings.xml` dy…
ivanlanin Apr 16, 2014
94e1661
Merge remote-tracking branch 'upstream/develop' into develop
ivanlanin Apr 16, 2014
306c354
ODText Writer: Additional unit tests
ivanlanin Apr 16, 2014
4db75c3
QA: Additional tests for Word2007 writer
ivanlanin Apr 17, 2014
f5f03a5
Emulate \ZipArchive::extractTo for PCLZip
ivanlanin Apr 17, 2014
f829559
ODT Writer: Basic image writing support
ivanlanin Apr 18, 2014
0060e43
PHPMD fixes and remove Style\Tabs (not needed)
ivanlanin Apr 22, 2014
43d5aa3
DOCX Reader: Read titles
ivanlanin Apr 22, 2014
03ff0fb
Doc: Add documentation source
ivanlanin Apr 23, 2014
3249941
Refactor: Apply composite design pattern to HTML writer
ivanlanin Apr 24, 2014
b7480d8
Refactor: Apply composite design pattern to Word2007/OOXML writer
ivanlanin Apr 25, 2014
559a798
Refactor: Apply composite design pattern to ODText/OpenDocument writer
ivanlanin Apr 25, 2014
2be4cbf
Refactor: Apply composite design pattern to RTF writer
ivanlanin Apr 25, 2014
2567a22
Update changelog and fine tune changes
ivanlanin Apr 25, 2014
ec9d900
Refactor: Fine tune element writing
ivanlanin Apr 25, 2014
7863e39
Writer: Style writers
ivanlanin Apr 26, 2014
0f79eb5
Refactor: Split `AbstractContainer` from `AbstractElement`
ivanlanin Apr 26, 2014
1635c83
Docs: Update documentation
ivanlanin Apr 26, 2014
8ace1c1
Add icons from http://fontawesome.io/
ivanlanin Apr 26, 2014
d25dc96
ODT Writer: Link writing
ivanlanin Apr 26, 2014
919564f
Merge branch 'refs/heads/master' into develop
gabrielbull Apr 26, 2014
2cbdb0b
ODText Writer: Style writers
ivanlanin Apr 26, 2014
a861218
Merge remote-tracking branch 'upstream/develop' into develop
ivanlanin Apr 27, 2014
a4fa3df
Refactor: Apply composite pattern for Word2007 reader
ivanlanin Apr 27, 2014
b4c2298
Update .gitignore
ivanlanin Apr 27, 2014
1ed8f0d
Refactor: Remove some duplication found by phpcpd. One more to go.
ivanlanin Apr 28, 2014
27a2307
Resize test images
ivanlanin Apr 28, 2014
a676af3
ODText Reader: Basic ODText reader
ivanlanin Apr 28, 2014
23db6fa
QA: Update documentation for new ODText reader #71
ivanlanin Apr 29, 2014
4a3400c
Refactor: Create writers' `Part` folders and remove all static parts
ivanlanin Apr 30, 2014
9861342
Refactor: Simplify DocumentProperties
ivanlanin Apr 30, 2014
4e5bbb9
Refactor: Increase DocumentProperties cohesion
ivanlanin Apr 30, 2014
9b1f2f2
Add style class checker and rename $fStyle/$pStyle variables
ivanlanin May 1, 2014
1a1356a
Section: Ability to define gutter and line numbering
ivanlanin May 1, 2014
1d84c1d
#151 Small caps, all caps, and double strikethrough; #199 Ability to …
ivanlanin May 1, 2014
9afa461
Docblock fixes
ivanlanin May 1, 2014
999a9c5
Style: Remove `bgColor` from `Font`, `Table`, and `Cell` and put it i…
ivanlanin May 2, 2014
e613e13
New `Indentation` and `Spacing` style; Ability to define first line a…
ivanlanin May 2, 2014
c0f5347
#211 Fix license info in composer.json
ivanlanin May 2, 2014
6606d5c
Remove spurious executable bits
siwinski May 2, 2014
e820c3b
Normalize EOL to \n
siwinski May 2, 2014
3f4adcf
Merge pull request #214 from siwinski/pr-remove-executable-bits
ivanlanin May 2, 2014
475d948
Merge branch 'pr-normalize-eol' of github.com:siwinski/PHPWord into d…
ivanlanin May 2, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
.Trashes
Thumbs.db
Desktop.ini
.idea
_build
phpunit.xml
composer.lock
composer.phar
vendor
/report
/.settings
phpunit.xml
/.buildpath
/.project
/.idea
/.project
/.settings
/build
/vendor
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ before_script:
## Composer
# - curl -s http://getcomposer.org/installer | php
# - php composer.phar install --prefer-source
- composer self-update
- composer require dompdf/dompdf:0.6.*
- composer install --prefer-source
- composer selfupdate --quiet
## PHP_CodeSniffer
- pyrus install pear/PHP_CodeSniffer
- phpenv rehash
Expand All @@ -37,7 +38,7 @@ before_script:

script:
## PHP_CodeSniffer
- phpcs --standard=PSR2 -n src/
- phpcs --standard=PSR2 -n src/ --ignore=src/PhpWord/Shared/PCLZip
- phpcs --standard=PSR2 -n tests/
## PHP Copy/Paste Detector
#- php phpcpd.phar --verbose src/
Expand Down
86 changes: 86 additions & 0 deletions CHANGELOG.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,92 @@

This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub.

## 0.10.0 - Not yet released

This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced.

### Features

- Image: Get image dimensions without EXIF extension - @andrew-kzoo GH-184
- Table: Add `tblGrid` element for Libre/Open Office table sizing - @gianis6 GH-183
- Footnote: Ability to insert textbreak in footnote `$footnote->addTextBreak()` - @ivanlanin
- Footnote: Ability to style footnote reference mark by using `FootnoteReference` style - @ivanlanin
- Font: Add `bgColor` to font style to define background using HEX color - @jcarignan GH-168
- Table: Add `exactHeight` to row style to define whether row height should be exact or atLeast - @jcarignan GH-168
- Element: New `CheckBox` element for sections and table cells - @ozilion GH-156
- Settings: Ability to use PCLZip as alternative to ZipArchive - @bskrtich @ivanlanin GH-106 GH-140 GH-185
- Template: Ability to find & replace variables in headers & footers - @dgudgeon GH-190
- Template: Ability to clone & delete block of text using `cloneBlock` and `deleteBlock` - @diego-vieira GH-191
- TOC: Ability to have two or more TOC in one document and to set min and max depth for TOC - @Pyreweb GH-189
- Table: Ability to add footnote in table cell - @ivanlanin GH-187
- Footnote: Ability to add image in footnote - @ivanlanin GH-187
- ListItem: Ability to add list item in header/footer - @ivanlanin GH-187
- CheckBox: Ability to add checkbox in header/footer - @ivanlanin GH-187
- Link: Ability to add link in header/footer - @ivanlanin GH-187
- Object: Ability to add object in header, footer, textrun, and footnote - @ivanlanin GH-187
- Media: Add `Media::resetElements()` to reset all media data - @juzi GH-19
- General: Add `Style::resetStyles()`, `Footnote::resetElements()`, and `TOC::resetTitles()` - @ivanlanin GH-187
- DOCX Reader: Ability to read header, footer, footnotes, link, preservetext, textbreak, pagebreak, table, list, image, and title - @ivanlanin
- Endnote: Ability to add endnotes - @ivanlanin
- ListItem: Ability to create custom list and reset list number - @ivanlanin GH-10 GH-198
- ODT Writer: Basic table writing support - @ivanlanin
- Image: Keep image aspect ratio if only 1 dimension styled - @japonicus GH-194
- HTML Writer: Basic HTML writer: text, textrun, link, title, textbreak, table, image (as Base64), footnote, endnote - @ivanlanin GH-203 GH-67 GH-147
- PDF Writer: Basic PDF writer using DomPDF: All HTML element except image - @ivanlanin GH-68
- DOCX Writer: Change `docProps/app.xml` `Application` to `PHPWord` - @ivanlanin
- DOCX Writer: Create `word/settings.xml` and `word/webSettings.xml` dynamically - @ivanlanin
- ODT Writer: Basic image writing - @ivanlanin
- ODT Writer: Link writing - @ivanlanin
- ODT Reader: Basic ODText Reader - @ivanlanin GH-71
- Section: Ability to define gutter and line numbering - @ivanlanin
- Font: Small caps, all caps, and double strikethrough - @ivanlanin GH-151
- Settings: Ability to use measurement unit other than twips with `setMeasurementUnit` - @ivanlanin GH-199
- Style: Remove `bgColor` from `Font`, `Table`, and `Cell` and put it into the new `Shading` style - @ivanlanin
- Style: New `Indentation` and `Spacing` style - @ivanlanin
- Paragraph: Ability to define first line and right indentation - @ivanlanin

### Bugfixes

- Footnote: Footnote content doesn't show footnote reference number - @ivanlanin GH-170
- Documentation: Error in a function - @theBeerNut GH-195

### Deprecated

- `createTextRun` replaced by `addTextRun`
- `createFootnote` replaced by `addFootnote`
- `createHeader` replaced by `addHeader`
- `createFooter` replaced by `addFooter`
- `createSection` replaced by `addSection`
- `Element\Footnote::getReferenceId` replaced by `Element\AbstractElement::getRelationId`
- `Element\Footnote::setReferenceId` replaced by `Element\AbstractElement::setRelationId`
- `Footnote::addFootnoteLinkElement` replaced by `Media::addElement`
- `Footnote::getFootnoteLinkElements` replaced by `Media::getElements`
- All current methods on `Media`
- `Element\Link::getLinkSrc` replaced by `Element\Link::getTarget`
- `Element\Link::getLinkName` replaced by `Element\Link::getText`
- `Style\Cell::getDefaultBorderColor`

### Miscellaneous

- Documentation: Simplify page level docblock - @ivanlanin GH-179
- Writer: Refactor writer classes and create a new `Write\AbstractWriter` abstract class - @ivanlanin GH-160
- General: Refactor folders: `Element` and `Exception` - @ivanlanin GH-187
- General: Remove legacy `HashTable` and `Shared\ZipStreamWrapper` and all related properties/methods - @ivanlanin GH-187
- Element: New `AbstractElement` abstract class - @ivanlanin GH-187
- Media: Refactor media class to use one method for all docPart (section, header, footer, footnote) - @ivanlanin GH-187
- General: Remove underscore prefix from all private properties name - @ivanlanin GH-187
- General: Move Section `Settings` to `Style\Section` - @ivanlanin GH-187
- General: Give `Abstract` prefix and `Interface` suffix for all abstract classes and interfaces as per [PHP-FIG recommendation](https://github.com/php-fig/fig-standards/blob/master/bylaws/002-psr-naming-conventions.md) - @ivanlanin GH-187
- Style: New `Style\AbstractStyle` abstract class - @ivanlanin GH-187
- Writer: New 'ODText\Base` class - @ivanlanin GH-187
- General: Rename `Footnote` to `Footnotes` to reflect the nature of collection - @ivanlanin
- General: Add some unit tests for Shared & Element (100%!) - @Progi1984
- Test: Add some samples and tests for image wrapping style - @brunocasado GH-59
- Refactor: Remove Style\Tabs - @ivanlanin
- Refactor: Apply composite pattern for writers - @ivanlanin
- Refactor: Split `AbstractContainer` from `AbstractElement` - @ivanlanin
- Refactor: Apply composite pattern for Word2007 reader - @ivanlanin

## 0.9.1 - 27 Mar 2014

This is a bugfix release for PSR-4 compatibility.
Expand Down
File renamed without changes.
223 changes: 112 additions & 111 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,111 +1,112 @@
# ![PHPWord](https://rawgit.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord")

[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord)
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword)
[![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword)
[![Latest Unstable Version](https://poser.pugx.org/phpoffice/phpword/v/unstable.png)](https://packagist.org/packages/phpoffice/phpword)
[![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword)


PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), and [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF).

With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your PHP 5.3+ scripts. Below are some of the things that you can do with PHPWord library:

* Set document properties, e.g. title, subject, and creator.
* Create document sections with different settings, e.g. portrait/landscape, page size, and page numbering
* Create header and footer for each sections
* Set default font type, font size, and paragraph style
* Use UTF-8 and East Asia fonts/characters
* Define custom font styles (e.g. bold, italic, color) and paragraph styles (e.g. centered, multicolumns, spacing) either as named style or inline in text
* Insert paragraphs, either as a simple text or complex one (a text run) that contains other elements
* Insert titles (headers) and table of contents
* Insert text breaks and page breaks
* Insert and format images, either local, remote, or as page watermarks
* Insert binary OLE Objects such as Excel or Visio
* Insert and format table with customized properties for each rows (e.g. repeat as header row) and cells (e.g. background color, rowspan, colspan)
* Insert list items as bulleted, numbered, or multilevel
* Insert hyperlinks
* Create document from templates
* Use XSL 1.0 style sheets to transform main document part of OOXML template
* ... and many more features on progress

__Want to contribute?__ [Fork us](https://github.com/PHPOffice/PHPWord/fork) or [submit](https://github.com/PHPOffice/PHPWord/issues) your bug reports or feature requests to us.

## Requirements
* PHP 5.3+
* PHP [Zip](http://php.net/manual/en/book.zip.php) extension
* PHP [XML Parser](http://www.php.net/manual/en/xml.installation.php) extension

### Optional PHP extensions
* PHP [GD](http://php.net/manual/en/book.image.php) extension
* PHP [XMLWriter](http://php.net/manual/en/book.xmlwriter.php) extension
* PHP [XSL](http://php.net/manual/en/book.xsl.php) extension

## Installation

It is recommended that you install the PHPWord library [through composer](http://getcomposer.org/). To do so, add
the following lines to your ``composer.json``.

```json
{
"require": {
"phpoffice/phpword": "dev-master"
}
}
```

Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPWord/releases).
In this case, you will have to register the autoloader.

```php
require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
PhpOffice\PhpWord\Autoloader::register();
```

## Basic usage

The following is a basic example of the PHPWord library. More examples are provided in the [samples folder](samples/).

```php
$phpWord = new \PhpOffice\PhpWord\PhpWord();

// Every element you want to append to the word document is placed in a section.
// To create a basic section:
$section = $phpWord->createSection();

// After creating a section, you can append elements:
$section->addText('Hello world!');

// You can directly style your text by giving the addText function an array:
$section->addText('Hello world! I am formatted.',
array('name'=>'Tahoma', 'size'=>16, 'bold'=>true));

// If you often need the same style again you can create a user defined style
// to the word document and give the addText function the name of the style:
$phpWord->addFontStyle('myOwnStyle',
array('name'=>'Verdana', 'size'=>14, 'color'=>'1B2232'));
$section->addText('Hello world! I am formatted by a user defined style',
'myOwnStyle');

// You can also put the appended element to local object like this:
$fontStyle = new \PhpOffice\PhpWord\Style\Font();
$fontStyle->setBold(true);
$fontStyle->setName('Verdana');
$fontStyle->setSize(22);
$myTextElement = $section->addText('Hello World!');
$myTextElement->setFontStyle($fontStyle);

// Finally, write the document:
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$objWriter->save('helloWorld.docx');

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'ODText');
$objWriter->save('helloWorld.odt');

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'RTF');
$objWriter->save('helloWorld.rtf');
```

## Documentation

__Want to know more?__ Read the full documentation of PHPWord on [Read The Docs](http://phpword.readthedocs.org/).
# ![PHPWord](https://rawgit.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord")

[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord)
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword)
[![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword)
[![Latest Unstable Version](https://poser.pugx.org/phpoffice/phpword/v/unstable.png)](https://packagist.org/packages/phpoffice/phpword)
[![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword)


PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), and [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF).

With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your PHP 5.3+ scripts. Below are some of the things that you can do with PHPWord library:

* Set document properties, e.g. title, subject, and creator.
* Create document sections with different settings, e.g. portrait/landscape, page size, and page numbering
* Create header and footer for each sections
* Set default font type, font size, and paragraph style
* Use UTF-8 and East Asia fonts/characters
* Define custom font styles (e.g. bold, italic, color) and paragraph styles (e.g. centered, multicolumns, spacing) either as named style or inline in text
* Insert paragraphs, either as a simple text or complex one (a text run) that contains other elements
* Insert titles (headers) and table of contents
* Insert text breaks and page breaks
* Insert and format images, either local, remote, or as page watermarks
* Insert binary OLE Objects such as Excel or Visio
* Insert and format table with customized properties for each rows (e.g. repeat as header row) and cells (e.g. background color, rowspan, colspan)
* Insert list items as bulleted, numbered, or multilevel
* Insert hyperlinks
* Insert footnotes and endnotes
* Create document from templates
* Use XSL 1.0 style sheets to transform main document part of OOXML template
* ... and many more features on progress

__Want to contribute?__ [Fork us](https://github.com/PHPOffice/PHPWord/fork) or [submit](https://github.com/PHPOffice/PHPWord/issues) your bug reports or feature requests to us.

## Requirements
* PHP 5.3+
* PHP [Zip](http://php.net/manual/en/book.zip.php) extension
* PHP [XML Parser](http://www.php.net/manual/en/xml.installation.php) extension

### Optional PHP extensions
* PHP [GD](http://php.net/manual/en/book.image.php) extension
* PHP [XMLWriter](http://php.net/manual/en/book.xmlwriter.php) extension
* PHP [XSL](http://php.net/manual/en/book.xsl.php) extension

## Installation

It is recommended that you install the PHPWord library [through composer](http://getcomposer.org/). To do so, add
the following lines to your ``composer.json``.

```json
{
"require": {
"phpoffice/phpword": "dev-master"
}
}
```

Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPWord/releases).
In this case, you will have to register the autoloader.

```php
require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
\PhpOffice\PhpWord\Autoloader::register();
```

## Basic usage

The following is a basic example of the PHPWord library. More examples are provided in the [samples folder](samples/).

```php
$phpWord = new \PhpOffice\PhpWord\PhpWord();

// Every element you want to append to the word document is placed in a section.
// To create a basic section:
$section = $phpWord->addSection();

// After creating a section, you can append elements:
$section->addText('Hello world!');

// You can directly style your text by giving the addText function an array:
$section->addText('Hello world! I am formatted.',
array('name'=>'Tahoma', 'size'=>16, 'bold'=>true));

// If you often need the same style again you can create a user defined style
// to the word document and give the addText function the name of the style:
$phpWord->addFontStyle('myOwnStyle',
array('name'=>'Verdana', 'size'=>14, 'color'=>'1B2232'));
$section->addText('Hello world! I am formatted by a user defined style',
'myOwnStyle');

// You can also put the appended element to local object like this:
$fontStyle = new \PhpOffice\PhpWord\Style\Font();
$fontStyle->setBold(true);
$fontStyle->setName('Verdana');
$fontStyle->setSize(22);
$myTextElement = $section->addText('Hello World!');
$myTextElement->setFontStyle($fontStyle);

// Finally, write the document:
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$objWriter->save('helloWorld.docx');

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'ODText');
$objWriter->save('helloWorld.odt');

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'RTF');
$objWriter->save('helloWorld.rtf');
```

## Documentation

__Want to know more?__ Read the full documentation of PHPWord on [Read The Docs](http://phpword.readthedocs.org/).
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"homepage": "http://phpoffice.github.io",
"type": "library",
"license": "LGPL-3.0+",
"license": "LGPL-2.1+",
"authors": [
{
"name": "Mark Baker"
Expand All @@ -25,6 +25,10 @@
{
"name": "Ivan Lanin",
"homepage": "http://ivan.lanin.org"
},
{
"name": "Roman Syroeshko",
"homepage": "http://ru.linkedin.com/pub/roman-syroeshko/34/a53/994/"
}
],
"require": {
Expand All @@ -36,9 +40,10 @@
"phpunit/phpunit": "3.7.*"
},
"suggest": {
"ext-gd2": "*",
"ext-xmlwriter": "*",
"ext-xsl": "*"
"ext-gd2": "Required to add images",
"ext-xmlwriter": "Required to write DOCX and ODT",
"ext-xsl": "Required to apply XSL style sheet to template part",
"dompdf/dompdf": "Required to write PDF"
},
"autoload": {
"psr-4": {
Expand Down
Loading