phpWord中的粗体、间距和缩进文本
我有一些文本需要加粗,与前面和后面的段落分开,并缩进。 我不能让这三个属性一起工作 这适用于粗体和空格:phpWord中的粗体、间距和缩进文本,php,phpword,Php,Phpword,我有一些文本需要加粗,与前面和后面的段落分开,并缩进。 我不能让这三个属性一起工作 这适用于粗体和空格: $section = $phpWord->addSection(); $section->addText( 'Re: Your Application for Post of Security Guard', array('bold' => true), array('space' => array('before' => 360, 'a
$section = $phpWord->addSection();
$section->addText(
'Re: Your Application for Post of Security Guard',
array('bold' => true),
array('space' => array('before' => 360, 'after' => 280))
);
这适用于缩进:
$section = $phpWord->addSection();
$section->addText(
'Re: Your Application for Post of Security Guard',
array('indentation' => array('left' => 540, 'right' => 120))
);
但这不起作用:
$section = $phpWord->addSection();
$section->addText(
'Re: Your Application for Post of Security Guard',
array('bold' => true),
array('space' => array('before' => 360, 'after' => 280)),
array('indentation' => array('left' => 540, 'right' => 120))
);
有人能帮我吗?区段添加文本功能是:
$section->addText($text, [$fontStyle], [$paragraphStyle]);
i、 e.正确的方法是将段落样式组合到一个数组中:
$section = $phpWord->addSection();
$section->addText(
'Re: Your Application for Post of Security Guard',
array('bold' => true),
array(
'space' => array('before' => 360, 'after' => 280),
'indentation' => array('left' => 540, 'right' => 120)
)
);
我猜今天没有phpWord专家了。谢谢,ejuhjav。太好了!