Forum


Replies: 4   Views: 4132
Addsection 'oddpage' does not create a blank page when needed
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 Greg Sims  · 03-02-2015 - 16:44

I am using addSection to cause a page break to an odd numbered page. This is useful when starting a new chapter of a book. $docx->addSection('oddPage', 'A4',$layout); In this case the new section does start on an odd page so this portion is working. We're having problems using addSection in that a blank page is not created as a result of the page break. The Introduction begins on page 3. Then we issue an addSection for the first chapter. This results in the first chapter starting on page 5 -- all good. The problem is the resulting document does not contain a page 4 -- it skips directly from page 3 to page 5. I hope we will be able to use addSection instead of keeping track of the page numbering in php.