Forum


Replies: 1   Views: 3903
Headers keep changing
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 hr_online  · 08-08-2014 - 18:06

i'm using addHeader for setting 2 headers: for the cover page and the other pages. my code: $img = array( 'name' => "cover.png", 'dpi' => 290, 'rawWordML' => true, 'target' => 'defaultHeader', 'spacingLeft' => -160 ); $cover = $this->get_image($img); $img = array( 'name' => 'header.png', 'dpi' => 290, 'rawWordML' => true, 'target' => 'defaultHeader', 'spacingTop' => 160 ); $header = $this->get_image($img); $this->obj->addHeader(array( "default" => $header, "first" => $cover )); the syntax is correct and it also works, but from time to time, phpdocx will ignore the cover-page setting and uses the "header"-setting also for the cover page .. very strange. any ideas what is causing this/how to fix it? thanks

Posted by admin  · 11-08-2014 - 11:02

Hello, Please post or send us a DOCX that works and a DOCX that fails. Regards.