Skip to content

Issue with detecting justify alignment in converting DOCX to HTML #2520

Open
@mdabagh

Description

@mdabagh

Dear developers,

I am currently using the PhpWord library to convert a DOCX file to HTML format using the following code:

$Content = IOFactory::load(public_path('test.docx'));
$writer = new \PhpOffice\PhpWord\Writer\HTML($Content);
$contentHtml = $writer->getContent();
dd($contentHtml);

However, I noticed that the above code does not properly detect paragraphs with justify alignment. It only sets the text-align property to left or right in the converted HTML. I believe the issue lies in the handling of text alignment during the conversion process.

I would like to request assistance in resolving this issue or guidance on any possible workarounds. Please let me know if any additional details or examples are required.

Thank you for your support and for developing the PhpWord library.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions