【发布时间】:2017-01-20 12:52:24
【问题描述】:
我正在尝试在 PHPWord 中创建一个没有边框的 TextBox,但是将 borderColor 或 borderSize 设置为 0 或 null 没有任何效果,而且我总是在文本框周围至少有一个黑色边框.
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$textbox = $section->addTextBox(
array(
'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END,
'width' => 200,
'height' => 40,
'borderColor' => null,
'borderSize' => 0,
)
);
$textbox->addText('dummy-text ...', null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END));
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord);
$objWriter->save('dummy.docx');
【问题讨论】: