0 Hi,
Thanks for the answers ,here I am using Rotativa library for generating the pdf report and when I rendering the view I am getting the master page related exceptions where I should not use master page in that view.
Here is my code.
return new ViewAsPdf("ExporttoPDF.aspx", viewModel)
{
FileName = "Report.pdf",
CustomSwitches = "--print-media-type --header-center \"text\""
};
With the above code I am not able to show any header and footer and I have to show page numbers in Header and footer.Please help on this.
0 Follow below links that may help you:
https://stackoverflow.com/questions/10515548/how-to-add-page-number-in-footer-in-pdf-by-itextsharp
https://stackoverflow.com/questions/18996323/add-header-and-footer-for-pdf-using-itextsharp
https://www.codeproject.com/Questions/1019714/adding-page-number-to-pdf-using-itextsharp
0 Refer below link:
http://www.c-sharpcorner.com/blogs/adding-a-header-or-footer-to-pdf-in-c-sharp
0 Hi
refer this links
1. https://stackoverflow.com/questions/18996323/add-header-and-footer-for-pdf-using-itextsharp
2. https://www.codeproject.com/Questions/112064/How-to-add-Header-and-Footer-in-a-pdf-using-itexts
if you satisfied then accept my solution