RazorPDF Samples

-   Nov 02, 2012 -   Development -  

I worked up some more advanced RazorPDF samples to help you get started with using RazorPDF in your MVC projects. First, I went ahead and made an very simple HTML report and ran it through the PdfResult to output it as a PDF.  It is nice way to make a PDF without iText XML.  You can use this to easily take any view and allow the user to display it as a PDF.  I think you can format your PDFs better with iText XML, but this works well in a lot of situations. Loading .... Next, I made a sample report showing more detailed iText XML that you might use in actual production report. Paragraphs, images, tables and lists in different fonts, sizes, styles and colors.  I added some of the most common tags in this Gist to use as a reference. Loading .... The reports mentioned are all checked in to the RazorPDF Sample project on GitHub. I encourage you to check it out if you are planning to give RazorPDF a try.

 RazorPDF updates and source code

-   Oct 26, 2012 -   Development -  

There has been a lot of interest in RazorPDF since I published it earlier this month.  The most common question has been about the source code, which I’m happy to announce is finally available on GitHub. I’ll try to get more details on syntax and more advanced usage posted soon as well.  In the meantime, I’ve set up a RazorPDF project page were I’ll keep everything you might need to know. Source Code Samples Links to iText Markup samples Posts on usage Thanks for all the interest in RazorPDF.

 Introducing RazorPDF

-   Oct 15, 2012 -   Development -  

Like many developers, I’ve been working with the Razor View Engine for a while.  Prior to MVC 3 and Razor, I was using Spark as my default view engine and I was pretty happy with it.  Being a long time Spark user, I sometimes find myself wishing I was using Spark for certain things.  The Spark feature I’ve easily missed the most however was the slick way you could uses Spark to mark up iText XML and in turn generate PDFs. I finally got around to spending a few hours to create this functionality using a Razor view (borrowing heavily from the Spark project). It is very easy to use and makes creating PDFs in your ASP.NET MVC projects a breeze. Simply add the RazorPDF nuget package to your project. Have your Controller action return a RazorPDF.PdfResult with your model and view name assigned. Create the view with itext xml to create the PDF output you want. Check out this short video showing you RazorPDF in action (2:18) and take a look at the RazorPDFSample project on GitHub to get you going.  The sample project has some basic iText XML samples, but there are plenty more on the web.