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), Rich Text Format (RTF), HTML, and PDF.

Github Repo

https://github.com/code-wife/word2html

Requirements

PHPWord requires the following: