A pure PHP library for reading and writing word processing documents
Go to file
Ivan Lanin db57346c47 Reactivate CodeSniffer for both src and test. PSR-2 has included PSR-1. 2014-03-24 03:22:52 +07:00
docs Method name & code format for PSR/phpdoc compliance 2014-03-24 03:20:18 +07:00
samples Method name & code format for PSR/phpdoc compliance 2014-03-24 03:20:18 +07:00
src/PhpWord Method name & code format for PSR/phpdoc compliance 2014-03-24 03:20:18 +07:00
test Method name & code format for PSR/phpdoc compliance 2014-03-24 03:20:18 +07:00
.gitignore Removed files from gitignore 2014-03-23 12:55:37 -04:00
.travis.yml Reactivate CodeSniffer for both src and test. PSR-2 has included PSR-1. 2014-03-24 03:22:52 +07:00
CHANGELOG.md Method name & code format for PSR/phpdoc compliance 2014-03-24 03:20:18 +07:00
CONTRIBUTING.md (1) Change CHANGELOG format to simplify release notes creation (2) Add CONTRIBUTING guideline 2014-03-23 11:21:59 +07:00
README.md Simplify README.md and move the full documentation to RST. 2014-03-20 22:53:48 +07:00
composer.json FIXED : Validation of composer.json (composer validate) after Packagists mails 2014-03-23 16:59:28 +01:00
license.md Added readme and license file 2012-07-05 07:25:13 +02:00
phpunit.xml.dist Made autoloader PSR-4 compliant and removed PHPWORD_BASE_DIR global constant 2014-03-23 12:48:18 -04:00

README.md

PHPWord

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

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 (OOXML or OpenXML), OASIS Open Document Format for Office Applications (OpenDocument or ODF), and 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 or submit your bug reports or feature requests to us.

Want to know more? Read the full documentation of PHPWord on Read The Docs.