Click here to Skip to main content
15,943,008 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I have a MVC3, Razor engine application having 8 different views(.cshtml).I have these pages for users to enter personal details and other things.I have a requirement to download the content of all these 8 pages(.cshtml) as shown in browser in a button click as a single PDF file and save it.The pages(.cshtml) contains controls like dropdownbox,calender,radio button etc.Some of the contents in the views are loaded from models.Please Help.

Thanks,
Jaison
Posted
Comments
vyas_pratik20 29-Apr-14 1:12am    
my dear friend just google you will find
http://stackoverflow.com/questions/779430/asp-net-mvc-how-to-get-view-to-generate-pdf
http://stackoverflow.com/questions/18470277/exporting-a-pdf-file-with-asp-net-mvc

1 solution

You can use nuget (RazorPDF for MVC) for exporting razor page to pdf format , basically we need iTextSharp library for the pdf creation.
following is the link how to export pdf by razorpdf

http://www.dotnetjalps.com/2013/06/Creating-PDF-with-ASP-Net-MVC-and-RazorPDF.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900