问题
I am using PHPWord to create report. When I am creating a section it automatically adding a page break which I donot want.
Is there any way to remove the added page break?
or Is there any way to createSection without the page break?
Please note that I am not using any template. Just creating a doc file from database with tables and images.
Thanks.
回答1:
You can define how the page breaks behave with the section breakType style. To remove the page breaks completely from the sections just use the 'continuous' value for the breakType:
$section = $phpWord->addSection(array('breakType' => 'continuous');
or
$section = $phpWord->addSection();
$section->getStyle()->setBreakType('continuous');
for more info check phpword styles and phpword containers
来源:https://stackoverflow.com/questions/28554893/how-to-remove-section-pagebreak-in-phpword