HeaderFooterPageEvent is the event class which is called for every new page. We are adding header,footer,left and right image in this class only. We can write conditions here if we want header,footer,left and right image on different pages.