Hi, so I have started my migration from 3 to 4 and just need to clarify some things.
is the following the correct method, it is working but it seems a lot more work to create a new WordFragment for each line of text, especilay when a lot of my code creates lots of tables with images and text in.
// Default Footer.
$footerLayout = new WordFragment($docx, 'defaultFooter');
$col1 = new WordFragment($docx);
$col1->addDateAndHour( array('jc' => 'left', 'b' => 'on', 'sz' => 7, 'color' => '555555', 'dateFormat' => "dd' of 'MMMM' 'yyyy' at 'H:mm" ) );
$col2 = new WordFragment($docx);
$col3->addPageNumber('numerical', array('jc' => 'center', 'b' => 'on', 'sz' => 7, 'color' => '555555' ) );
$col3 = new WordFragment($docx);
$col3->addtext('Company Name', array('jc' => 'right', 'b' => 'on', 'sz' => 7, 'color' => '555555' ) );
$footerLayout->addTable( array( array( $col1, $col2, $col3 ) ) ), array( 'border' => 'none', 'jc' => 'center', 'tableWidth' => array( 'type' => 'pct', 'value' => 100 ) ) );
$docx->addFooter(array('default' => $footerLayout));
The other thing that does not seem to be working is the template header.
There are the exact same lines , working in 3 but not in 4. And both read the same file.
The header on the 1st page never shows.
$docx->importHeadersAndFooters("../Corporate_Word_Template.docx", "header");
I have to use "merge" as "replace" does not seem to work, not a problem as I get what I want anyway.
$docx->importStyles("../Corporate_Word_Template.docx", "merge");
Many Thanks
G.