无法让 header 文本与 phpWord 文档中的页脚顶部对齐

Can't get header text to align to top of footer in phpWord doc

我的 header 左侧有徽标,右侧有文字。它几乎是完美的,但我无法让 文本 出现在页面的最顶部;它在中间左侧显示徽标。

我试过所有文本参数 - space、缩进、前后 - 无济于事。有什么想法吗?

我的代码是:

$section = $phpWord->addSection();   

$header = $section->addHeader();
$header ->addImage('logo.png',
        array(
            'width' => 200,
            'height' => 80,
          'wrappingStyle' => 'square',
    'positioning' => 'absolute',
    'posHorizontalRel' => 'margin',
    'posVerticalRel' => 'line',
        )
    );

$header->addText(
    'Company Name, Address blah blah
Blah blah blah blah blah blah blah',
    array('bold' => true),
    array(
        'space' => array('before' => 2, 'after' => 500), 
        'indentation' => array('left' => 4500, 'right' => 10)
    )
  );

在页眉中使用 table 怎么样?像这样(ofc 将单元格大小调整为与您的徽标大小相匹配的大小):

$section = $phpWord->addSection();   

$header = $section->addHeader();
$table = $header->addTable();
$table->addRow();
$table->addCell(4500)->addImage('logo.png',
        array(
            'width' => 200,
            'height' => 80,
        )
    );

$table->addCell(4500)->addText(
    'Company Name, Address blah blah Blah blah blah blah blah blah blah',
    array('bold' => true)
  );