Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kuritka/globalnotesdemo


https://github.com/kuritka/globalnotesdemo

Last synced: 24 days ago
JSON representation

Awesome Lists containing this project

README

        

Extremely easy way to create Pdf files from Asp.Net Core.

Usage:

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();
}

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 ActionResult.

It generates Pdf also from authorized actions (web forms authentication).