Q:

Using Rotativa in ASP.NET Core

I try to use Rotativa in ASP.NET Core, That is my code.
    public IActionResult Index(int artID)
    {
        var art = articleService.GetArticleForPrint(artID);
        return View(art);
    }

    public IActionResult PrintSpecifcArticle(int id)
    {
        var report = new ActionAsPdf("Index", new { artID = id })
        {
            FileName = "Invoice.pdf"
        };
        return report;
    }

I install this package:    Rotativa.NetCore 1.0.4
but it give me that error:
    System.ComponentModel.Win32Exception: The system cannot find the file 
specified
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Rotativa.NetCore.WkhtmlDriver.Convert(String wkhtmlPath, String 
switches, String html, String wkhtmlExe)
   at Rotativa.NetCore.AsPdfResultBase.WkhtmlConvert(String switches)
   at Rotativa.NetCore.AsResultBase.BuildFile(ActionContext context)
   at Rotativa.NetCore.AsResultBase.ExecuteResult(ActionContext context)
   at Microsoft.AspNetCore.Mvc.ActionResult.ExecuteResultAsync(ActionContext 
context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.
<InvokeResultAsync>d__30.MoveNext()

A:

The error is because Rotativa.NetCore couldn't find the folder with files that are necessary to create the pdf files.
If you didn't copy the Rotativa's folder to your Debug or Release folder (depending on your Configuration), do it. It must resolve your problem.

