创建带有半径边框的 TextBox

时间:2021-03-23 13:27:50

标签: phpword

我正在尝试在 PHPWord 中创建一个带有 redius 边框的 TextBox,但是将 borderRedius 或 borderSize 设置为 0 或 null 没有效果,我总是在文本框周围得到一个矩形。

$phpWord = new \PhpOffice\PhpWord\PhpWord();
$textbox = $section->addTextBox(
    array(
        'alignment'   => \PhpOffice\PhpWord\SimpleType\Jc::END,
        'width'       => 200,
        'height'      => 40,
        'borderRedius' => 50,
        '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');

任何帮助将不胜感激!

0 个答案:

没有答案