Here Mudassar Khan has explained with an example, how to export data from database to PDF file in ASP.Net MVC Razor.
The data from the database is fetched using Entity Framework and dynamic HTML string is generated using StringBuilder class.
Finally, the generated HTML string will be exported to PDF file using iTextSharp XMLWorkerHelper library in ASP.Net MVC Razor.
↧