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

Image alignment issue due to table cell formatting issue #2729

Open
2 tasks done
silambuc88 opened this issue Jan 24, 2025 · 0 comments
Open
2 tasks done

Image alignment issue due to table cell formatting issue #2729

silambuc88 opened this issue Jan 24, 2025 · 0 comments

Comments

@silambuc88
Copy link

Describe the bug and add attachments

I have a word document designed with table cells and mentioned tags inside the cells. Then using template processor, I'm trying to replace the tags to images. Due to some unknown cell formatting, the image is not fitting into the table cell.

Table cells with unknown format:
Image

Tag replaced with image output:
Image

Is there a way to clear the table cells unknown formatting before replacing the images?

Expected behavior

It works if we manually clear the formatting in the word document.
Image

Steps to reproduce

$templateProcessor->setImageValue('UserLogo', array('path' => 'path/to/logo.png', 'width' => 100, 'height' => 100, 'ratio' => false));

PHPWord version(s) where the bug happened

master

PHP version(s) where the bug happened

master

Priority

  • I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)
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