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

Missing and misaligned contents using createWriter #2574

Open
sakthivel-murughaiya opened this issue Feb 20, 2024 · 0 comments
Open

Missing and misaligned contents using createWriter #2574

sakthivel-murughaiya opened this issue Feb 20, 2024 · 0 comments

Comments

@sakthivel-murughaiya
Copy link

sakthivel-murughaiya commented Feb 20, 2024

Describe the Bug

Issue 1:

Read and rewrite the the original document in Word 2007 using PHPWord, text alignment missing in the document.

https://preethirait-gmail.tinytake.com/msc/OTI5MjgxNV8yMjg0NjU4Mw

Issue 2:

In PHPWord, Extract HTML content from a document, add it using addHTML, and then write it using a createWriter. However, it seems that rowspan and colspan are missing in the table.

https://preethirait-gmail.tinytake.com/msc/OTI5Mjg3OV8yMjg0NjY2Mg

Steps to Reproduce

Please provide a code sample that reproduces the issue.

issue1 :

$phpWord = \App\WordPhp\PhpWord\IOFactory::load($templateFile);
$objWriter = \App\WordPhp\PhpWord\IOFactory::createWriter($phpWord , 'Word2007');
$objWriter->save($path);

issue2 :

\App\WordPhp\PhpWord\Shared\Html::addHtml($section, $bodyContent, false, true);
$objWriter = \App\WordPhp\PhpWord\IOFactory::createWriter($pw, 'Word2007');
$objWriter->save($path);

Expected Behavior

While extracting content from the document(.docx) and inserting the header and footer sections, it does not disrupt the content or alignments.

Current Behavior

While extracting content from the document(.docx) and inserting the header and footer sections, it disrupts the alignment and content.

Context

Please fill in your environment information:

  • PHP Version: 7.2.5
  • PHPWord Version: dev-master
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