【PHPWord】页面Section

发布时间:2016-12-9 2:36:18 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"【PHPWord】页面Section",主要涉及到【PHPWord】页面Section方面的内容,对于【PHPWord】页面Section感兴趣的同学可以参考一下。

require_once 'PHPWord.php'; $PHPWord = new PHPWord(); //默认页面 $section = $PHPWord->createSection(array('borderColor'=>'00FF00','borderSize'=>12)); $section->addText('This is the default section'); //新页面 $section = $PHPWord->createSection(array('orientation'=>'landscape')); $section->addText('This is placed on a landscape section,Every page starting from this section will be landscape style'); $section->addPageBreak(); $section->addPageBreak(); //New portrait section $section = $PHPWord->createSection(array('marginLeft'=>600,'marginTop'=>600,'marginBottom'=>600)); $section->addText('This is section users other margins'); //保存文件 $objWriter = PHPWord_IOFactory::createWriter($PHPWord,'Word2007'); $objWriter->save('Section.docx');

上一篇:
下一篇:Android 开源库

相关文章

相关评论