Skip to content

Cannot set table width through a style defined by addTableStyle() #629

Open
@anrikun

Description

@anrikun

According to documentation this should write a 100% width table but width is ignored:

    $table_style = array(
      'unit' => \PhpOffice\PhpWord\Style\Table::WIDTH_PERCENT,
      'width' => 100 * 50,
    );
    $php_word->addTableStyle('myTable', $table_style);
    $table = $section->addTable('myTable');

Only the following writes a 100% width table as expected:

    $table = $section->addTable(array(
      'unit' => \PhpOffice\PhpWord\Style\Table::WIDTH_PERCENT,
      'width' => 100 * 50,
    ));

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions