This article will help you provide your users with the ability to export contents of Razor WebPages Webgrid to a PDF file using iTextSharp. It is a simple, and easy-to-follow tutorial.
All you need to do is get a hold of iTextSharp Library. You can do this within WebMatrix using the built-in Nuget feature. Just click the nugget button on the main menu and type “iTextSharp” in the search box.
There are a couple of iTextSharp versions available, so I suggest you pick the most recent version which is released under GNU Affero Public License.
For the rest of the tutorial, visit this blog:Â http://www.mikesdotnetting.com/Article/205/Exporting-The-Razor-WebGrid-To-PDF-Using-iTextSharp