1
我想沒有PHPWord邊界創建一個文本框,但設置borderColor
或borderSize
到0
或null
有沒有效果,我總是得到至少圍繞文本框黑色邊框邊框創建文本框。沒有PHPWord
$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');
嗯,我發現之前,我問,但它不適用於我不幸。如果我使用代碼'$ section-> addTextBox(array('alignment'=> \ PhpOffice \ PhpWord \ SimpleType \ Jc :: START,'width'=> 260,'height'=> 120,'borderSize'=>' none'));'我最終得到[這個結果](https://i.stack.imgur.com/koHR6.png)在Word for Mac Version 15.30 –
這對我也不起作用,如果我使用'' borderColor'=>'none''如鏈接中建議的 –
作爲臨時解決方案,我已將borderColor設置爲與文檔的背景顏色相同,例如''borderColor'=>'white'' – Yoga