I want to create a simple pdf with RazorPDF.
I installed it from Nuget Package. (itexsharp and razorpdf appear in reference)
Here's my controller:
public ActionResult Index()
{
return new RazorPDF.PdfResult();
}
And, I have a simple view that shows "hello".
When I use return view()
, everything is ok and "hello" is displayed, but when I use return new RazorPDF.PdfResult();
, the following error occurs:
The view 'Pdf' or its master was not found or no view engine supports the searched locations. The following locations were searched: view/home/pdf.aspx