Skip to content

Conversation

ctrlaltca
Copy link
Contributor

Sample 12 shows how to add a different header for the first page:

// Add first page header
$header = $section->addHeader();
$header->firstPage();
...
// Add header for all other pages
$subsequent = $section->addHeader();

This is supposed to work also for footers (since Header itself is a subclass of Footer), but it's currently broken because Section::hasDifferentFirstPage() only checks if a first-page specific header exists, but doesn't check for a first-page specific footer, too.

This PR adds the missing check, fixing the rendering of footers with type Footer::FIRST.

@ctrlaltca
Copy link
Contributor Author

As a workaround until this gets fixed, creating an empty header for the first page is enough to get the footers rendered correctly.

@troosan troosan merged commit c653377 into PHPOffice:develop Aug 13, 2017
@troosan troosan added this to the v0.14.0 milestone Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants