Permalink
Browse files

new readme

  • Loading branch information...
1 parent 49b23aa commit e6e87fba3518d39b17117353e7f2655b6094defb @webgio committed Jul 26, 2012
Showing with 27 additions and 0 deletions.
  1. +27 −0 README.markdown
View
@@ -0,0 +1,27 @@
+Extremely easy way to create Pdf files from Asp.net MVC.
+
+Usage:
+```csharp
+public ActionResult PrintIndex()
+{
+ return new ActionAsPdf("Index", new { name = "Giorgio" }) { FileName = "Test.pdf" };
+}
+
+public ActionResult Index(string name)
+{
+ ViewBag.Message = string.Format("Hello {0} to ASP.NET MVC!", name);
+
+ return View();
+}
+```
+ViewAsPdf now available. It enables you to render a view as pdf in just one move, thanks to scoorf
+```csharp
+public ActionResult TestViewWithModel(string id)
+{
+ var model = new TestViewModel {DocTitle = id, DocContent = "This is a test"};
+ return new ViewAsPdf(model);
+}
+```
+Also available a RouteAsPdf, UrlAsPdf and ViewAsPdf ActionResult.
+
+It generates Pdf also from authorized actions (web forms authentication).

0 comments on commit e6e87fb

Please sign in to comment.