【发布时间】:2016-03-03 16:17:38
【问题描述】:
我无法让 spaceAfter 和 spaceBefore 在 PHPWord 工作。
如果我不在段落样式中包含spaceAfter 或spaceBefore,则该部分前后会有一些空间。
如果我确实包含spaceAfter 或spaceBefore,那么无论我为间距输入什么,空格都会变为0。
我可以让其他段落样式同时工作,例如lineHeight 工作正常。
示例:
$section->addText(
"Some Text",
array(
"italic" => true
),
array(
"lineHeight" => 2.0, //Works fine
//I don't put all of these at once
//I just want to show some of the different parameters I've used
//And I've done the same with spaceAfter
"spaceBefore" => 1.0,
"spaceBefore" => "1.0",
"spaceBefore" => .5,
"spaceBefore" => ".5"
)
);
【问题讨论】: