Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: different footer for first page #1116

Merged
merged 1 commit into from Aug 13, 2017

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.

None yet

2 participants