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

Loop through nodes in header/footer functions #1199

Open
FelipeMicali opened this issue Nov 23, 2017 · 0 comments
Open

Loop through nodes in header/footer functions #1199

FelipeMicali opened this issue Nov 23, 2017 · 0 comments

Comments

@FelipeMicali
Copy link

FelipeMicali commented Nov 23, 2017

Hello!

I'm building conditional headers and footers with dynamic content for different parts of my generated document, storing references inside "id" property of my docDefinition objects, so I can define where a section start/end and call a function conditionally, based on ids properties.

To achieve that, I'm currently looping through my docDefinition array content and stacks, locating where these ids happen and retrieving currentPage from content[i].positions.

The problem is that the positions array is empty sometimes, dependind in wich docDefinition object I stored the id.

I think it would be really interesting to make the created nodes available in the header and footer function, like in pageBreakBefore function, so it would be possible to iterate through tem and locate ids and pageNumbers immediately. Or somehow make the pageBreakBefore function runs synchronously before header/footer functions.

Would you consider making this possible? It would make things much easier to create dynamic content or headers and footers!

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants