phpword - 创建带有半径边框的 TextBox
问题描述
我正在尝试在 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');
任何帮助,将不胜感激!!
解决方案
推荐阅读
- ms-access - 如何在从第一个表中删除数据时将数据从一个表附加到另一个表
- excel - ADODB.Connection & ADODB.Recordset - 用户定义类型未定义
- wordpress - Wordpress:我在 wp-content/themes/mytheme/function.php 中自动添加了一个代码
- java - 单击 CalendarView 中的日期后显示文本
- firebase - 在应用程序处于后台/终止时处理推送通知 (FCM) - Android
- r - 将大量列表转换为数据框中的变量
- reactjs - 在 react 中使用 Link 不会重新渲染组件
- ios - 尝试从 DynamoDB (Swift) 读取时出现 DynamoDBObjectModel 错误
- autodesk-forge - Autodesk Forge:设置全屏模式
- javascript - 如何更改 froala 编辑器的默认宽度?