Skip to content

Border color table unchangeable #1407

@designinglives

Description

@designinglives

I have the code below but the color of the border seems to be unchangeable. I read that it's cell specific as well so set the same to the cell as well. Still no change though. The font style is being set, the border still remains visible and black.

$phpWord = \PhpOffice\PhpWord\IOFactory::load($file);
$styleTable = array('borderColor'=>'ffffff', 'borderSize'=> 0, 'cellMargin'=>50, 'valign'=>'center');
$styleFirstRow = array('bgColor'=>'ffffff', 'valign'=>'center');
$styleCell = array('valign'=>'center');
$fontStyle = array('bold'=>false, 'align'=>'center', 'color'=>'ccc');

$phpWord->addTableStyle('myTable', $styleTable, $styleFirstRow);

$section = $phpWord->createSection();
$table = $section->addTable('myTable');

$table->addRow(900);
$table->addCell(2000, $styleCell)->addText('#SIG01_100_200#', $fontStyle);
$table->addCell(2000, $styleCell)->addText('#SIG02_100_200#', $fontStyle);

$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord , 'PDF');
$xmlWriter->save($file_pdf);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions