Skip to content

v0.12.0 #460

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 206 commits into from
Jan 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
4dd85e2
Version and changelog for 0.12.0
ivanlanin Jun 1, 2014
b38dd82
Merge branch 'master' into develop
ivanlanin Jun 2, 2014
a66f93c
#123: New drawing shapes (arc, curve, line, polyline, rect, oval)
ivanlanin Jun 2, 2014
61d8dbd
QA: Small fixes for #258 based on Scrutinizer https://scrutinizer-ci.…
ivanlanin Jun 2, 2014
420cf2b
Merge pull request #258 from ivanlanin/develop
ivanlanin Jun 2, 2014
e3dd449
#238: Known issue about read/write permission on temp folder
ivanlanin Jun 2, 2014
7030221
Merge remote-tracking branch 'upstream/develop' into develop
ivanlanin Jun 2, 2014
9c8620e
Refactor `IOFactory` to remove duplication
ivanlanin Jun 2, 2014
a2294b4
Font: New `scale`, `spacing`, and `kerning` property of font style
ivanlanin Jun 4, 2014
d576060
Fix rare PclZip/realpath/PHP version problem
andrew-kzoo Jun 4, 2014
2328e34
Refactor Word2007/Element to identify the same properties
ivanlanin Jun 3, 2014
1accec2
Refactor styles: Inherit Image and Line from Frame
ivanlanin Jun 5, 2014
f44ff4b
Added shading to the paragraph style for full width shading
Jun 5, 2014
00c6b76
Merge branch 'feature-paragraphBgColor' of github.com:lrobert/PHPWord…
ivanlanin Jun 5, 2014
479713d
Update changelog and unit test for #264
ivanlanin Jun 5, 2014
d97602f
Reduce duplications and fix some docblocks
ivanlanin Jun 5, 2014
3d2cd16
Ensure temp file in pclzipAddFile() removed
andrew-kzoo Jun 5, 2014
49f4e6b
RTF Writer: Support for sections, margins, and borders #249
ivanlanin Jun 6, 2014
a2ec62a
Section: Ability to set paper size, e.g. A4, A3, and Legal
ivanlanin Jun 6, 2014
09a143f
QA: Type check fix for RTF section style and docblock comment fix for…
ivanlanin Jun 6, 2014
8b0472d
Autoloader Options
hskrtich Jun 6, 2014
7bbaab3
Merge branch 'fix-rare-pclzip-realpath-php-version-issue' of github.c…
ivanlanin Jun 7, 2014
bc6b40d
Merge branch 'fix-rare-pclzip-temp-file-issue' of github.com:andrew-k…
ivanlanin Jun 7, 2014
0489533
Merge branch 'develop' of github.com:bskrtich/PHPWord into develop
ivanlanin Jun 7, 2014
01853f7
Update change log and adjust some coding standards for #261, #265, an…
ivanlanin Jun 7, 2014
8938439
Refactor elements to move set relation Id from container to element
ivanlanin Jun 7, 2014
a9c9c21
Fix Travis test error
ivanlanin Jun 7, 2014
63d53ac
Use section "style" instead of "settings" for consistency
ivanlanin Jun 8, 2014
3197524
Docs: Restructure documentation
ivanlanin Jun 8, 2014
e952fde
Refactor PhpWord to reduce dependencies
ivanlanin Jun 8, 2014
6839ee4
New `PhpWord::save()` method to encapsulate `IOFactory`
ivanlanin Jun 8, 2014
1ec0589
Update basic example
ivanlanin Jun 8, 2014
4c04071
Fix typo: ODT > ODText
ivanlanin Jun 9, 2014
d17a806
Small fixes for addHtml.
hskrtich Jun 9, 2014
8e93c91
Update changelog for #270
ivanlanin Jun 10, 2014
056ff5e
Basic chart support
ivanlanin Jun 10, 2014
a93b686
Chart improvements
ivanlanin Jun 11, 2014
f54d9a1
#274: Page breaks on titles and tables
ivanlanin Jun 11, 2014
e9f8e88
#275: Recipe for adding a link within a title
ivanlanin Jun 11, 2014
9a5f91a
Merge branch 'develop' into chart
ivanlanin Jun 12, 2014
8c2b099
Merge `Shared\Drawing` and `Shared\Font` into `Shared\Converter`
ivanlanin Jun 14, 2014
3fef190
#278: Basic chart
ivanlanin Jun 12, 2014
0f085f7
Merge branch 'chart' into develop
ivanlanin Jun 14, 2014
a13e5b2
#278: 3D charts and ability to set width and height
ivanlanin Jun 15, 2014
6a81691
#266: Ability to add textinput, checkbox, and dropdown form elements
ivanlanin Jun 15, 2014
384107e
Ability to define document protection and new `Metadata` subnamespace
ivanlanin Jun 16, 2014
5c8e100
Bugfix #280: Table inside vertical border does not rendered properly
ivanlanin Jun 16, 2014
71b4ac9
FIXED : #282 : problem converting docx to pdf
Progi1984 Jun 17, 2014
f193534
FIXED : CI : Error with the generation of the PHPDoc
Progi1984 Jun 17, 2014
eeca396
[CHANGED] Added annotations to StyleTest and performed minor refactor…
Jun 19, 2014
c11df2e
[CHANGED] Added annotations to StyleTest and performed minor refactor…
Jun 19, 2014
d35db83
[CHANGED] Added annotations to StyleTest and performed minor refactor…
Jun 20, 2014
0ea2193
[CHANGED] Replaced "assertEquals" with "assertCount" where it was nec…
Jun 20, 2014
cd54792
New structured document tag (SDT) element
ivanlanin Jun 20, 2014
b527d06
#23 : Implement Word97 aka MsDoc Reader
Progi1984 Jun 21, 2014
df8de96
#23 : Implement Word97 aka MsDoc Reader
Progi1984 Jun 21, 2014
5be8414
Settings: OOXML compatibility
ivanlanin Jun 20, 2014
8efe80b
QA: Use Composer for Travis test tools
ivanlanin Jun 22, 2014
ea6ec47
Update composer dependencies
ivanlanin Jun 22, 2014
6e175ab
Revert phpunit to 3.7.* because 4.* is too slow sebastianbergmann/php…
ivanlanin Jun 22, 2014
b2daeed
Merge branch 'develop' into sdt
ivanlanin Jun 23, 2014
a5c857f
#289 : Update elements.rst
Progi1984 Jun 24, 2014
b5a63c5
Elaborate SDT elements
ivanlanin Jun 28, 2014
2d351c9
Merge branch 'sdt' into develop
ivanlanin Jun 28, 2014
689a737
Fix Travis errors
ivanlanin Jun 28, 2014
33570f7
#294: Support for paragraph with borders
ivanlanin Jun 28, 2014
415d9b9
Update tests
ivanlanin Jun 29, 2014
40e4134
Fix PHPCS
ivanlanin Jun 29, 2014
d8aef5c
Bugfix #294: `add<elementName>` of container should be case insensitive
ivanlanin Jul 1, 2014
3c694ea
[NEW] Introduced CreateTemporaryFileException.
Jul 2, 2014
ea826ec
[NEW] Introduced CreateTemporaryFileException.
Jul 2, 2014
dbc9737
[NEW] Introduced CreateTemporaryFileException.
Jul 2, 2014
369f55a
[NEW] Introduced CreateTemporaryFileException.
Jul 2, 2014
75c8e7e
[NEW] Introduced CopyFileException.
Jul 2, 2014
c446028
[Changed] Refactored Template a little.
Jul 2, 2014
e1164f8
[Changed] Refactored Template a little.
Jul 2, 2014
52406da
For absolute positioning vPos and hPos need to be set to POS_ABSOLUTE
Jul 2, 2014
20d986b
[CHANGED] Documentation on Zip API providers.
Jul 3, 2014
d0a609b
[CHANGED] Added "@return" annotation where it as missed.
Jul 3, 2014
8056b69
[CHANGED] Docblock for pass-by-reference parameters.
Jul 3, 2014
4a02142
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
2c5d13c
[FIXED] Typo in Section->addHeaderFooter().
Jul 4, 2014
f2e9e37
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
47a17a3
Revert: [FIXED] Wrong use of passing by reference.
Jul 4, 2014
1b9b8d4
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
d54a674
add element bookmark and allow links to internal bookmarks in Word2007
jonnsn Jul 4, 2014
fdeefb7
include minor changes from develop branch
jonnsn Jul 4, 2014
475c76d
convert tabs to spaces
jonnsn Jul 4, 2014
4d060b3
sync with develop-branch
jonnsn Jul 4, 2014
f2c4329
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
87c3df5
add missing file
jonnsn Jul 4, 2014
fd209fc
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
c4638df
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
7bbe1ed
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
197c6ec
[FIXED] Wrong use of passing by reference.
Jul 4, 2014
7c8ff28
add sample
jonnsn Jul 4, 2014
6c9cffd
updated documentation for link-Element.
jonnsn Jul 4, 2014
7202634
fix wrong formatting
jonnsn Jul 4, 2014
a23ff4d
Merge pull request #305 from jonnsn/internal-links
Progi1984 Jul 6, 2014
61406af
FIXED : #292 : Update elements.rst
Progi1984 Jul 9, 2014
07e03fc
bugfix: specific borders were not written correctly in word2007
pscheit Jul 15, 2014
9c66921
Merge pull request #327 from pscheit/bugfix-margin-border-develop
Progi1984 Aug 4, 2014
06005e3
Update CHANGELOG.md
Progi1984 Aug 4, 2014
f25833c
#327 : Fixes PHP-MD errors
Progi1984 Aug 4, 2014
56c3d8e
https://github.com/PHPOffice/PHPWord/issues/310
Aug 10, 2014
e6d88a2
Refactored usages of "tempnam()" function.
Aug 10, 2014
e31f080
Removed unused comment.
Aug 10, 2014
3d06c77
Minor refactoring of "Shared\ZipArchive" class.
Aug 10, 2014
6f2d444
https://github.com/PHPOffice/PHPWord/issues/310
Aug 11, 2014
8d9e85b
#331 : Word2007 Writer : Support for RTL
Progi1984 Aug 12, 2014
ca69de3
#23 : Implement Word97 aka MsDoc Reader
Progi1984 Aug 15, 2014
e561d54
Merge branch 'develop' of https://github.com/PHPOffice/PHPWord into d…
Progi1984 Aug 16, 2014
4ade9c3
#23 : Implement Word97 aka MsDoc Reader (PHPCS-PHPMD Fixes)
Progi1984 Aug 16, 2014
90d64bd
#23 : Implement Word97 aka MsDoc Reader (PHPCS-PHPMD Fixes)
Progi1984 Aug 16, 2014
1a40f66
#23 : Implement Word97 aka MsDoc Reader (Changelog)
Progi1984 Aug 16, 2014
ec25dd3
https://github.com/PHPOffice/PHPWord/issues/216
Aug 16, 2014
5a75d84
Merge remote-tracking branch 'origin/develop' into develop
Aug 16, 2014
0151a21
#23 : Implement Word97 aka MsDoc Reader (Documentation )
Progi1984 Aug 16, 2014
8da62eb
Merge branch 'develop' of https://github.com/PHPOffice/PHPWord into d…
Progi1984 Aug 16, 2014
d66e855
#23 : Implement Word97 aka MsDoc Reader (Documentation )
Progi1984 Aug 16, 2014
bf0136c
https://github.com/PHPOffice/PHPWord/issues/216
Aug 16, 2014
62c7991
Update CONTRIBUTING.md
Aug 18, 2014
48322ca
Merge pull request #339 from franzholz/patch-2
Progi1984 Aug 18, 2014
9757fbb
[FIXED] https://github.com/PHPOffice/PHPWord/issues/340
Aug 23, 2014
d11b0de
[FIXED] https://github.com/PHPOffice/PHPWord/issues/340
Aug 23, 2014
9b3b1aa
Set the right method name for addShape() in PHPDoc @method for Abstra…
gmta Aug 30, 2014
c4cbabe
Merge pull request #302 from basjan/absolute-positioning
Sep 7, 2014
42955f1
Merge pull request #302 from basjan/absolute-positioning
Sep 7, 2014
5811aac
Merge pull request #302 from basjan/absolute-positioning
Sep 7, 2014
fdbd983
Merge pull request #356 from GMTA/develop
Sep 7, 2014
5adbae4
Merge pull request #356 from GMTA/develop
Sep 7, 2014
941d2c7
Update CONTRIBUTING.md
Sep 10, 2014
5b11071
Merge pull request #366 from franzholz/patch-1
Progi1984 Sep 11, 2014
5cdf329
Update CONTRIBUTING.md
Sep 16, 2014
68422ef
Merge pull request #373 from franzholz/patch-3
Sep 17, 2014
24d8cc7
Update installing.rst
Sep 18, 2014
dbe160d
Merge pull request #374 from franzholz/patch-3
Progi1984 Sep 18, 2014
8912786
Update CONTRIBUTING.md
Sep 20, 2014
b49f08b
Merge pull request #376 from franzholz/patch-3
Progi1984 Sep 21, 2014
c8b6499
Update installing.rst
Sep 22, 2014
27b0c69
Update Head.php
Sep 22, 2014
556a8b5
Merge pull request #377 from franzholz/patch-3
Progi1984 Sep 22, 2014
6c3088e
Merge pull request #378 from franzholz/patch-4
Progi1984 Sep 22, 2014
4e25283
Add missing setters for pageSizeW and pageSizeH
spikex Sep 22, 2014
cf96ea0
Width/Height set/get tests
spikex Oct 2, 2014
cf5625b
Update pageSizeW and pageSizeH docs
spikex Oct 2, 2014
cea15f3
Use page width and height default constants in tests
spikex Oct 2, 2014
1127120
Update Changelog for setPageSizeW and setPageSizeH
spikex Oct 2, 2014
9d73173
Merge pull request #390 from spikex/develop
Progi1984 Oct 3, 2014
4445fd3
Replaced `array_key_exists` with `isset` for better performance.
Oct 10, 2014
2c81d5f
Some phpdoc for https://github.com/PHPOffice/PHPWord/pull/390.
Oct 10, 2014
06d6b71
[CHANGED] "tests/bootstrap.php".
Oct 14, 2014
fa575ef
Minor refactoring.
Oct 14, 2014
d231641
Update Documentation
Progi1984 Oct 15, 2014
7b2ec5e
Reverted #373.
Oct 16, 2014
b1acecb
Correct spelling of fldCharType separate. See http://www.ecma-interna…
Oct 20, 2014
6784fb2
Merge pull request #400 from pjt33/develop
Progi1984 Oct 20, 2014
b2286f8
[FIXED] https://github.com/PHPOffice/PHPWord/issues/401
Oct 22, 2014
b4be9c6
https://github.com/PHPOffice/PHPWord/issues/310
Nov 3, 2014
53eaf47
[CHANGED] "CONTRIBUTING.md".
Nov 3, 2014
3a11daa
[CHANGED] "CONTRIBUTING.md".
Nov 3, 2014
89e722e
[CHANGED] "CONTRIBUTING.md".
Nov 3, 2014
f4b5eaa
[FIXED] https://github.com/PHPOffice/PHPWord/issues/401
Nov 4, 2014
c0e04fa
Reverted #51.
Nov 7, 2014
e7fdb7f
Reverted #51.
Nov 7, 2014
37ca009
Extend HTML output for pagebreaks for PDF generation
chc88 Nov 14, 2014
f18e51a
[CHANGED] "CONTRIBUTING.md".
Nov 14, 2014
7b11002
[CHANGED] "README.md".
Nov 23, 2014
34e6f50
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
beeaf89
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
4a0da83
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
41f6aec
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
9a6c224
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
b8ee099
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
07cec9c
[CHANGED] "intro.rst".
Nov 23, 2014
d1993a4
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
b4d31ca
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
8dcbc92
[CHANGED] "README.md". Added notice required about input escaping.
Nov 23, 2014
ca664a5
Update Table.php
Dec 3, 2014
a15573b
Merge pull request #438 from franzholz/patch-2
Progi1984 Dec 3, 2014
455a4c4
#438
Dec 4, 2014
f8ee230
[FIXED] Typo.
Dec 4, 2014
2cb124f
https://github.com/PHPOffice/PHPWord/issues/51
Dec 9, 2014
fa7f2cd
https://github.com/PHPOffice/PHPWord/issues/51
Dec 9, 2014
41983e0
Merge pull request #356 from GMTA/develop
Dec 9, 2014
9e36c29
Update pdf-generation
chc88 Dec 10, 2014
d330e57
Update PageBreak.php
chc88 Dec 10, 2014
2176232
Merge PR #441
Progi1984 Dec 10, 2014
9b58606
Merge PR #441
Progi1984 Dec 10, 2014
2cd4eeb
Merge branch 'chc88-master' into develop
Progi1984 Dec 10, 2014
6490b7e
UPDATED : composer.lock
Progi1984 Dec 11, 2014
56cd784
UPDATED : travis.yml for support of PHP 5.3
Progi1984 Dec 11, 2014
fbfde2e
#441 (added @since annotation).
Dec 17, 2014
42c0b70
Replaced "phpversion()" function call with "PHP_VERSION" constant usage.
Dec 17, 2014
20c4232
[CHANGED] "Sample_Header.php" (added @return annotations where missed).
Dec 17, 2014
42b878e
[CHANGED] "Sample_Header.php" (changed date default timezone to UTC).
Dec 17, 2014
c44bd37
Minor refactoring.
Dec 17, 2014
277c2fb
Merge pull request #1 from PHPOffice/develop
h6w Dec 29, 2014
474f8ef
Update AbstractStyle.php
h6w Dec 29, 2014
7d2c0a6
Update CHANGELOG.md
h6w Dec 29, 2014
d4d498d
Merge pull request #458 from h6w/develop
Progi1984 Dec 29, 2014
c116afb
#51 (updated samples).
Jan 1, 2015
5285f00
#51 (updated changelog).
Jan 1, 2015
5d8a499
Changelog minor refactoring.
Jan 1, 2015
81be513
Changelog minor refactoring.
Jan 1, 2015
2b9111f
Update CHANGELOG.md
Progi1984 Jan 3, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
.Trashes
Thumbs.db
Desktop.ini
composer.phar
.idea
_build
phpunit.xml
composer.lock
composer.phar
vendor
/report
/samples/resources
/samples/results
/.settings
phpword.ini
/.buildpath
/.idea
/.project
/.settings
/build
/vendor
/.project
25 changes: 7 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.3.3
- 5.3
- 5.4
- 5.5
Expand All @@ -10,6 +9,7 @@ php:

matrix:
allow_failures:
- php: 5.2
- php: hhvm

env:
Expand All @@ -23,17 +23,6 @@ before_script:
## Composer
- composer self-update
- composer install --prefer-source --dev
## PHP Copy/Paste Detector
- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
## PHP Mess Detector
- pear config-set preferred_state beta
- printf "\n" | pecl install imagick
- pear channel-discover pear.phpmd.org
- pear channel-discover pear.pdepend.org
- pear install --alldeps phpmd/PHP_PMD
- phpenv rehash
## PHPLOC
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
## PHPDocumentor
- mkdir -p build/docs
- mkdir -p build/coverage
Expand All @@ -42,15 +31,15 @@ script:
## PHP_CodeSniffer
- ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
## PHP Copy/Paste Detector
- php phpcpd.phar src/ tests/ --verbose
- ./vendor/bin/phpcpd src/ tests/ --verbose
## PHP Mess Detector
- phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
## PHPLOC
#- php phploc.phar src/
- ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
## PHPUnit
- phpunit -c ./ --coverage-text --coverage-html ./build/coverage
- ./vendor/bin/phpunit -c ./ --coverage-text --coverage-html ./build/coverage
## PHPLOC
- ./vendor/bin/phploc src/
## PHPDocumentor
- vendor/bin/phpdoc.php -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig"
- ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig"

after_script:
## PHPDocumentor
Expand Down
279 changes: 170 additions & 109 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing to PHPWord

PHPWord is build by the crowd and for the crowd. Every contributions are welcomed; either by [submitting](https://github.com/PHPOffice/PHPWord/issues) bug issues or suggesting improvements, or in a more active form like [requesting](https://github.com/PHPOffice/PHPWord/pulls) a pull.
PHPWord is built by the crowd and for the crowd. Every contribution is welcome; either by [submitting](https://github.com/PHPOffice/PHPWord/issues) bug issues or suggesting improvements, or in a more active form like [requesting](https://github.com/PHPOffice/PHPWord/pulls) a pull.

We want to create a high quality document writer and reader library that people can use with more confidence and less bugs. We want to collaborate happily, code joyfully, and get a life merrily. Thus, below are some guidelines that we expect to be followed by each contributor.
We want to create a high quality document writer and reader library that people can use with more confidence and less bugs. We want to collaborate happily, code joyfully, and get alive merrily. Thus, below are some guidelines, that we expect to be followed by each contributor.

- **Be brief, but be bold**: State your issues briefly, but speak out your ideas loudly, even if you can't or don't know how to implement it right away. The world will be better with limitless innovations.
- **Code in PSR**: We use PHP Standards Recommendation (PSR) from as the PHP Framework Interoperability Group (PHP-FIG). If you're not familiar with this standard, please [familiarize yourself now](https://github.com/php-fig/fig-standards). Use [PHPCodeSniffer](http://pear.php.net/package/PHP_CodeSniffer/) to check your code against this standard.
- **Test your code**: Nobody else knows your code better than you. So, please, test your own code before submitting your pull request. PHPWord uses [PHPUnit](http://phpunit.de/) as our testing framework.
- **Request pull in separate branch**: Do not submit your request to the master branch, but create a separate branch named specifically for the issue that you addressed. Read [GitHub manual](https://help.github.com/articles/using-pull-requests) to find out more about this. If you are new to GitHub, read [this short manual](https://help.github.com/articles/fork-a-repo) to get you familiar with forks and how git works in general.
- **Be brief, but be bold**. State your issues briefly. But speak out your ideas loudly, even if you can't or don't know how to implement it right away. The world will be better with limitless innovations.
- **Follow PHP-FIG standards**. We follow PHP Standards Recommendations (PSRs) by [PHP Framework Interoperability Group](http://www.php-fig.org/). If you're not familiar with these standards, please, [familiarize yourself now](https://github.com/php-fig/fig-standards). Also, please, use [PHPCodeSniffer](http://pear.php.net/package/PHP_CodeSniffer/) to validate your code against PSRs.
- **Test your code**. Nobody else knows your code better than you. So, it's completely yours mission to test the changes you made before pull request submission. We use [PHPUnit](https://phpunit.de/) for our testing purposes and recommend you using this tool too. [Here](https://phpunit.de/presentations.html) you can find PHPUnit best practices and additional information on effective unit testing, which helps us making PHPWord better day to day. Do not hesitate to smoke it carefully. It's a great investment in quality of your work, and it saves you years of life.
- **Request pull in separate branch**. Do not submit your request to the master branch. But create a separate branch named specifically for the issue that you addressed. Read [GitHub manual](https://help.github.com/articles/using-pull-requests) to find out more about this. If you are new to GitHub, read [this short manual](https://help.github.com/articles/fork-a-repo) to get yourself familiar with forks and how git works in general. [This video](http://www.youtube.com/watch?v=-zvHQXnBO6c) explains how to synchronize your Github Fork with the Branch of PHPWord.

That's it. Thank you for your interest in PHPWord, and welcome!

May the Force be with you.
May the Force be with you.
117 changes: 86 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ PHPWord is a library written in pure PHP that provides a set of classes to write

PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/COPYING.LESSER). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/develop/).

Read more about PHPWord:

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Getting started](#getting-started)
- [Contributing](#contributing)
- [Developers' Documentation](http://phpword.readthedocs.org/)
- [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/)

## Features

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:
Expand All @@ -30,6 +40,9 @@ With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your
- Insert list items as bulleted, numbered, or multilevel
- Insert hyperlinks
- Insert footnotes and endnotes
- Insert drawing shapes (arc, curve, line, polyline, rect, oval)
- Insert charts (pie, doughnut, bar, line, area, scatter, radar)
- Insert form fields (textinput, checkbox, and dropdown)
- Create document from templates
- Use XSL 1.0 style sheets to transform main document part of OOXML template
- ... and many more features on progress
Expand Down Expand Up @@ -67,55 +80,97 @@ require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
\PhpOffice\PhpWord\Autoloader::register();
```

## Usages
## Getting started

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

```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!');
<?php
require_once 'src/PhpWord/Autoloader.php';
\PhpOffice\PhpWord\Autoloader::register();

// 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));
// Creating the new document...
$phpWord = new \PhpOffice\PhpWord\PhpWord();

// 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');
/* Note: any element you append to a document must reside inside of a Section. */

// You can also put the appended element to local object like this:
// Adding an empty Section to the document...
$section = $phpWord->addSection();
// Adding Text element to the Section having font styled by default...
$section->addText(
htmlspecialchars(
'"Learn from yesterday, live for today, hope for tomorrow. '
. 'The important thing is not to stop questioning." '
. '(Albert Einstein)'
)
);

/*
* Note: it's possible to customize font style of the Text element you add in three ways:
* - inline;
* - using named font style (new font style object will be implicitly created);
* - using explicitly created font style object.
*/

// Adding Text element with font customized inline...
$section->addText(
htmlspecialchars(
'"Great achievement is usually born of great sacrifice, '
. 'and is never the result of selfishness." '
. '(Napoleon Hill)'
),
array('name' => 'Tahoma', 'size' => 10)
);

// Adding Text element with font customized using named font style...
$fontStyleName = 'oneUserDefinedStyle';
$phpWord->addFontStyle(
$fontStyleName,
array('name' => 'Tahoma', 'size' => 10, 'color' => '1B2232', 'bold' => true)
);
$section->addText(
htmlspecialchars(
'"The greatest accomplishment is not in never falling, '
. 'but in rising again after you fall." '
. '(Vince Lombardi)'
),
$fontStyleName
);

// Adding Text element with font customized using explicitly created font style object...
$fontStyle = new \PhpOffice\PhpWord\Style\Font();
$fontStyle->setBold(true);
$fontStyle->setName('Verdana');
$fontStyle->setSize(22);
$myTextElement = $section->addText('Hello World!');
$fontStyle->setName('Tahoma');
$fontStyle->setSize(13);
$myTextElement = $section->addText(
htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)')
);
$myTextElement->setFontStyle($fontStyle);

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

// Saving the document as ODF file...
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'ODText');
$objWriter->save('helloWorld.odt');

$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'RTF');
$objWriter->save('helloWorld.rtf');
// Saving the document as HTML file...
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$objWriter->save('helloWorld.html');

/* Note: we skip RTF, because it's not XML-based and requires a different example. */
/* Note: we skip PDF, because "HTML-to-PDF" approach is used to create PDF documents. */
```
:warning: Escape any string you pass to OOXML/ODF/HTML document, otherwise it may get broken.

More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/) for more detail.

## Contributing

We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute:
We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute.

- Read [our contributing guide](https://github.com/PHPOffice/PHPWord/blob/master/CONTRIBUTING.md)
- [Fork us](https://github.com/PHPOffice/PHPWord/fork) and [request a pull](https://github.com/PHPOffice/PHPWord/pulls) to the [develop](https://github.com/PHPOffice/PHPWord/tree/develop) branch
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPWord/issues) to GitHub
- Follow [@PHPWord](https://twitter.com/PHPWord) and [@PHPOffice](https://twitter.com/PHPOffice) on Twitter
- Read [our contributing guide](https://github.com/PHPOffice/PHPWord/blob/master/CONTRIBUTING.md).
- [Fork us](https://github.com/PHPOffice/PHPWord/fork) and [request a pull](https://github.com/PHPOffice/PHPWord/pulls) to the [develop](https://github.com/PHPOffice/PHPWord/tree/develop) branch.
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPWord/issues) to GitHub.
- Follow [@PHPWord](https://twitter.com/PHPWord) and [@PHPOffice](https://twitter.com/PHPOffice) on Twitter.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.1
0.12.0
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "phpoffice/phpword",
"description": "PHPWord - A pure PHP library for reading and writing word processing documents (DOCX, ODT, RTF, HTML, PDF)",
"keywords": [
"PHP", "PhpOffice", "office", "PhpWord", "word", "template", "reader", "writer",
"PHP", "PhpOffice", "office", "PhpWord", "word", "template", "template processor", "reader", "writer",
"docx", "OOXML", "OpenXML", "Office Open XML", "ISO IEC 29500", "WordprocessingML",
"RTF", "Rich Text Format", "doc", "odt", "OpenDocument", "PDF", "HTML"
],
Expand Down Expand Up @@ -39,6 +39,9 @@
"phpunit/phpunit": "3.7.*",
"phpdocumentor/phpdocumentor":"2.*",
"squizlabs/php_codesniffer": "1.*",
"phpmd/phpmd": "2.*",
"sebastian/phpcpd": "2.*",
"phploc/phploc": "2.*",
"dompdf/dompdf":"0.6.*",
"tecnick.com/tcpdf": "6.*",
"mpdf/mpdf": "5.*"
Expand All @@ -47,7 +50,7 @@
"ext-zip": "Used to write DOCX and ODT",
"ext-gd2": "Used to add images",
"ext-xmlwriter": "Used to write DOCX and ODT",
"ext-xsl": "Used to apply XSL style sheet to template part",
"ext-xsl": "Used to apply XSL style sheet to main document part of OOXML template",
"dompdf/dompdf": "Used to write PDF"
},
"autoload": {
Expand Down
Loading