Skip to content

Problem with phpword converting docx to html #2488

Open
@ddiaz427

Description

@ddiaz427

Describe the Bug

I'm attempting to convert a DOCX document to HTML using the PHPWord library. However, during the conversion process, it doesn't include images, backgrounds, headers, or footers. It only retains tables and plain text without any styling. Below my code:

Steps to Reproduce

use PhpOffice\PhpWord\IOFactory;
$phpWord = IOFactory::load('test1.docx', 'Word2007');
$htmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');
$htmlWriter->save('test.html');

I am attaching the docx:

test2.docx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions