如何使用phpword将页脚拉伸到页面的全宽?

如何使用phpword将页脚拉伸到页面的全宽?,php,doc,phpword,Php,Doc,Phpword,我使用PHPWord生成一个文档。 如何删除页脚左侧的缩进,使其占据整个宽度 对于标题,我使用: $header = $section->addHeader(); $header->addImage('images/header.png', array( 'width'=>600, 'height'=>72, 'marginLeft' =

我使用PHPWord生成一个文档。 如何删除页脚左侧的缩进,使其占据整个宽度

对于标题,我使用:

$header = $section->addHeader();
        $header->addImage('images/header.png',
            array(
                'width'=>600,
                'height'=>72,
                'marginLeft' => -75,
                'positioning'=>'absolute',
                'wrappingStyle'=> 'behind',
                'posHorizontal' => 'absolute',
                'posVertical' => 'absolute'
            ));
但对于footer来说,它不起作用

$footer = $section->addFooter();
        $footer->addImage('images/footer.png',
            array(
                'width'=>600,
                'height'=>72,
                'marginLeft' => -75,
                'positioning'=>'absolute',
                'posHorizontal' => 'absolute',
                'posVertical' => 'absolute',
            ));
第二个问题,是否可以使用phpword将文本放在页脚图像的顶部?

我解决了我的问题。 我用于页脚:

$footer->addImage('images/footer.png',
            array(
                'width'=>600,
                'height'=>72,
                'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
                'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
                'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
                'marginLeft' => -75,
                'marginTop'=>-50,
                'wrappingStyle'=> 'behind'
            ));