Skip to content

Image alignment issue due to table cell formatting issue #2729

Open
@silambuc88

Description

@silambuc88

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)

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