Skip to content

DOCX to HTML #1184

@sato2010

Description

@sato2010

Hi, i need convert DOCX to HTML. Here is my code example:

$phpWord = \PhpOffice\PhpWord\IOFactory::load($fileTmp);
$htmlWriter = new \PhpOffice\PhpWord\Writer\HTML($phpWord);
$htmlWriter->save('test1doc.html');

Output html no correct
Space in one sentence replaced on few new lines
Example:
in DOCX "Hello my world"
Output Html:
"Hello"
"my"
"world"

How fix this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions