如何使用 phpword 将页脚拉伸到页面的整个宽度?

How to stretch the footer to the full width of the page using phpword?

我使用 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 = $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'
            ));