Я хочу установить заголовок слова слева, по центру, но не могу.Контент моего центра ложится от левого контента.Мой код дал ниже:
foreach($news as $n){
$section = $phpWord->addSection();
$header = $section->addHeader();
/*$sectionStyle = array(
'orientation' => 'landscape',
'marginTop' => 400,
'colsNum' => 2,
); */
$header->addText("Branch Address :", array('bold' => true,'name'=> 'times new roman','size' => 11,'color' =>'','align' => 'left','colsNum' => 2,'lineHeight' =>1 ));
$section->addTextBreak(1);
$header->addText("SARATHY MAIN WORKSHOP", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>'','align' => 'left','lineHeight' =>1));
$section->addTextBreak(1);
$header->addText("Sarathy Bajaj", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>'','align' => 'left','lineHeight' =>1));
$section->addTextBreak(1);
$header->addText("Pallimukku", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>''),array('colsNum' => 2,'align' => 'left',));
//$section->addTextBreak(1);
$header->addText("Kollam-10,", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>'','align' => 'left','lineHeight' =>1));
$header->addText("Kerala[State Code:32]", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>'','align' => 'left','lineHeight' =>1));
$header->addTextBreak(1);
$header->addImage($targetFile.'bajaj.png', array('align' => 'center','width'=>150, 'height'=>100));
$header->addText("SARATHY MOTORS", array('bold' => true,'name'=> 'times new roman','size' => 12,'color' =>'black'),array('align' => 'center'));
//$section = $phpWord->addSection();
$header->addText("Sarathy Bajaj Pallimukku Kollam Kerala State", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>''),array('align' => 'center','lineHeight' =>1));
$header->addText("Code:32 Kerala[State Code:32]", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>''),array('align' => 'center','lineHeight' =>1));
$header->addTextBreak(1);
$header->addText("GSTIN:", array('bold' => true,'name'=> 'times new roman','size' => 9,'color' =>'','align' => 'left','lineHeight' =>1));
$header->addText("32ABQFS6676M1ZA:", array('bold' => true,'name'=> 'times new roman','size' => 9),array('color' =>'','align' => 'left',));
$header->addText("Tax Invoice", array('bold' => true,'underline' => 'single','name'=> 'arial','size' => 21),array('align' => 'center','color' =>'black' ));
$header->addTextBreak(1);
$lineStyle = array('weight'=>1,'width' =>590,'height' => 0,'align'=>'left','color' => 'black');
$header->addLine($lineStyle);
$section->addText($n['inv_jcard_date'], array('name'=> 'arial','size' => 14),array('align' => 'left', 'spaceAfter' => 10));
//$section->addTextBreak(1);
$section->addText($n['inv_no'], array('name'=> 'arial','size' => 14),array('align' => 'right', 'spaceAfter' => 10));
}
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$objWriter->save($filename);
Пожалуйста, помогите решить проблему.Мой вывод дал ниже: