2016-11-21 4 views
0

PHPWORD : 나는이 textrun 재산 'paragraphStyle'을 설정할 수 없습니다

$text = $textrun->addText($organization['name']); 
$text->setFontStyle($textFontStyleBold); 
$text->setParagraphStyle($textParagraphStyle); 

하지만 ...

$textrun = $section->createTextRun(); 
$textrun->setParagraphStyle($textParagraphStyle); 

$text = $textrun->addText($organization['name']); 
$text->setFontStyle($textFontStyleBold); 
$text->setParagraphStyle($textParagraphStyle); 

$text = $textrun->addText(", bla_bla"); 
$text->setFontStyle($textFontStyle); 
$text->setParagraphStyle($textParagraphStyle); 

// var_dump ($textrun) 
// protected 'paragraphStyle' => null 

답변

0

$ textrun = $ 섹션 -> createTextRun ($ textParagraphStyle)를 작동;