Skip to content

jandginvestment/rotativa_sample

Repository files navigation

Steps

Add Rotativa 1.2.0 beta using Nuget Package Manager

Add below line in startup.cs file in configure method

RotativaConfiguration.Setup(env.WebRootPath);

Copy wkhtml.exe files to wwroot/Rotativa folder

Modify the controller method as

/// <summary>
       /// Method to return PDF to the view
       /// </summary>
       /// <returns>PDF file</returns>
       public IActionResult Index()
       {
           return new Rotativa.AspNetCore.ViewAsPdf("Index", GetStudents());  // Index view name , GetStudents() data as Model
           //return View();
       }

About

meant for a demo on how to integrate Rotativa - the PDF creator with the dot-net core MVC 3.1

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published