Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting loss during docx to HTML conversion #2378

Open
qwertynik opened this issue Feb 8, 2023 · 0 comments
Open

Formatting loss during docx to HTML conversion #2378

qwertynik opened this issue Feb 8, 2023 · 0 comments

Comments

@qwertynik
Copy link

Describe the Bug

When converting from docx to HTML, styling information is not extracted and applied during conversion.

Steps to Reproduce

test.docx

<?php
use PhpOffice\PhpWord\IOFactory;
use PhpOffice\PhpWord\Style;

require __DIR__ . '/vendor/autoload.php';

$documentPath = 'test.docx';
$phpWord = IOFactory::load($documentPath);

//Write word document to html
$xmlWriter = IOFactory::createWriter($phpWord, 'HTML');

$xmlWriter->save('test.html');

Expected Behavior

All the styling information present in the docx should also be available in the HTML output.

Current Behavior

Styling information is missing in the HTML output.

Context

  • PHP Version: 7.4.6
  • PHPWord Version: 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant