Forum


Replies: 9   Views: 4138
Upgrade from 3.7 to 4.0 : issues
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Bluecoat Systems  · 14-07-2014 - 11:47

Hi, it looks like the foot injection is causing the issue I am having, I modified the sample "addSection" to the following and it only shows the 1st and last page. G. //path to the CreateDocx class within your PHPDocX installation require_once '../../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $docx->addText($text); $paramsText = array( 'b' => true ); $docx->addText($text, $paramsText); $docx->addSection('nextPage', 'A4'); // Default Footer. $footerLayout = new WordFragment($docx, 'defaultFooter'); $col[0] = new WordFragment($docx); $col[0]->addDateAndHour( array('textAlign' => 'left', 'bold' => true, 'fontSize' => 7, 'color' => '555555', 'dateFormat' => "dd' of 'MMMM' 'yyyy' at 'H:mm" ) ); $col[1] = new WordFragment($docx); $col[1]->addPageNumber('numerical', array('textAlign' => 'center', 'bold' => true, 'fontSize' => 7, 'color' => '555555' ) ); $col[2] = new WordFragment($docx); $col[2]->addtext('My Company name', array('textAlign' => 'right', 'bold' => true, 'fontSize' => 7, 'color' => '555555' ) ); $footerLayout->addTable( array( $col ), array( 'border' => 'none', 'textAlign' => 'center', 'tableWidth' => array( 'type' => 'pct', 'value' => 100 ) ) ); $docx->addFooter(array('default' => $footerLayout)); $docx->addText($text); $docx->addSection('nextPage', 'A4-landscape'); $docx->addText($text); $docx->addSection('nextPage', 'A4'); $paramsText = array( 'b' => true ); $docx->addText($text, $paramsText); $docx->createDocx('example_addSection_1');