Creating a separate footer on the last page

I am having trouble creating a separate footer for the last page. Inserting a page break at the end and not linking the last page’s footer still cause it to appear as every footer. I have tried something like - { If { page } = { numpages } “Display this on the last page” " "}. It does work when looking at the original word document template, however when it is converted into a PDF, the “Display this on the last page” message is displayed on the footer of every page. Am I doing something wrong or does gembox not have this functionality? The page numbers using “page” and “numpages” work fine.

Hi,

Instead of adding a PageBreak, you need to create a new Section and add the footer to its Section.HeadersFooters collection.

In other words, you’ll have a DocumentModel with two sections in the DocumentModel.Sections collection. The first section will contain everything expect the last page that you need, the second section will have only the content of that last page and the footer that you need.

For more information, please check the Headers and Footers example.

I hope this helps, let me know if you need anything else.

Regards,
Mario