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

images styles in created file are broken. #2306

Open
roman-b-upqode opened this issue Oct 4, 2022 · 0 comments
Open

images styles in created file are broken. #2306

roman-b-upqode opened this issue Oct 4, 2022 · 0 comments

Comments

@roman-b-upqode
Copy link

roman-b-upqode commented Oct 4, 2022

Describe the Bug

A clear and concise description of what the bug is.

Steps to Reproduce

Please provide a code sample that reproduces the issue.

addSection(); $section->addText( $article_disclosure ); // XML Writer compatibility \PhpOffice\PhpWord\Settings::setCompatibility(false); \PhpOffice\PhpWord\Settings::setOutputEscapingEnabled(true); $obj_writer = \PhpOffice\PhpWord\IOFactory::createWriter( $phpWord ); $upload_dir = wp_upload_dir(); $file_url = $upload_dir['path'] . '/'. 'file-saved' . '.docx'; $file_path = $upload_dir['url'] . '/'. 'file-saved' . '.docx'; ob_clean(); $obj_writer->save( $file_url ); ?>

Expected Behavior

In my logic i need to read file, after that i need to add new paragraph in it and save new file with added format. When i do it then images styles are broken.

Current Behavior

What is the current behavior?

Context

Please fill in your environment information:

  • php version 8
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