dogukanatakul/docx-to-html

composer integration of xylude/Docx-to-HTML

Installs: 996

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:HTML

pkg:composer/dogukanatakul/docx-to-html

dev-main 2021-06-07 10:38 UTC

This package is auto-updated.

Last update: 2025-12-29 03:40:40 UTC


README

Source: https://github.com/nadirhamid/Docx-to-HTML

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 dogukanatakul/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";