nadirhamid/docx-to-html

composer integration of xylude/Docx-to-HTML

Installs: 16 808

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 24

Language:HTML

v0.0.1 2017-11-07 20:50 UTC

This package is auto-updated.

Last update: 2024-03-29 02:50:32 UTC


README

Converts .docx files to HTML

This is a PHP class that will convert your .docx files to HTML. It is by far not perfect, but will handle most things decently.

This class requires the following:

Composer install

composer require nadirhamid/docx-to-html

###How to use

include('./docx_reader.php');

$doc = new Docx_reader();
$doc->setFile('./sample.docx');

if(!$doc->get_errors()) {
    $html = $doc->to_html();
    $plain_text = $doc->to_plain_text();

    echo $html;
} else {
    echo implode(', ',$doc->get_errors());
}
echo "\n";