[Ultimate PDF] Different Header and Footer based on page logic
Reactive icon
Forge component by Leonardo Fernandes
Application Type

How can we set different header or footer content based on page.

For example we need to display Image 1 as header for first page, and need to display Image 2 as header for second and next page

Hello @Nadzir Yahaya 

As a user of this component, I believe this is not possible using Ultimate PDF alone. The component creator confirmed it in this Apr 2020 post.

As a work around, I recently suggested an alternative option in this post using the PDF Sharp component in addition to the Ultimate PDF. That post was about having different footers on different pages, but you can apply the solution to headers as well.

Though not a perfect one, it may still be a viable alternative especially if most of your pages have the same header/footer and you only need to append a few pages with different headers/footers for e.g. in the beginning and/or the end of the document. 




 Thanks for your suggestion it's work on different header requirements. But do you have a solution if we need to print the page number for this append page?

Hello Nadzir,

Yeah that's quite a challenge and unfortunately I could not work out a solution/ work around for the page number continuity across appended pdf documents.


Hi Nadzir, AJ.

If your use case is similar to a cover page, this is now possible with version 5.0.

You should use two PrintLayout blocks on the same screen, and they will both be rendered with their own header/footer. So you can use a PrintLayout for page 1, and another PrintLayout for pages 2 onwards.

If your use case is not covered by this solution, please let me know.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.