Page number in asp.net core footer (partial view)
-
Hello
I am using jsreport with my Asp.Net Core MVC project. It is working all right except for page numbers.
I am using a partial view for footer.
Here is the partial view:
<table style="font-size: 10px; padding-bottom: 5px; padding-top: 0in; padding-left: 0.25in; padding-right: 0.25in;"> <tbody> <tr> <td style="width: 1.5in; text-align: left;"><b>@($"{DateTime.Now}")</b></td> <td style="width: 8.2in; text-align: center;">Brand Name</td> <td style="width: 1.5in; text-align: right;">Page <span class="pageNumber"></span> of <span class="totalPages"></span></td> </tr> </tbody> </table>
Unfortunately, the page number part is not working at all. I just see "Page of " in the rendered PDF.
I am using the Chrome-PDF recipe and do not wish to use pdf-utils for the footer.
Even if I put the following line in the main report body view, I still do not get any page numbers.
Page <span class="pageNumber"></span> of <span class="totalPages"></span>
Any help will be appreciated.
-
I see I answered the same question on StackOverflow.
Please let me know if it is sufficient.
https://stackoverflow.com/questions/63323673/page-number-in-asp-net-core-footer-partial-view/63336052#63336052