You can try try
var actionResult = new ActionAsPdf("PRVRequestPdf", new { refnum = prv.rheader.request.Referenceno, emid = "Whatever this is" }); var byteArray = actionResult.BuildPdf(ControllerContext); var fileStream = new FileStream(fullPath, FileMode.Create, FileAccess.Write); fileStream.Write(byteArray, 0, byteArray.Length); fileStream.Close();
If that doesn't do the trick, you can follow the answers here
Just make sure that if you do this so that PRVRequestPdf does not return as a PDF view, but looks like the normal view like yours above (just mentioning how this could be done is that I invoke a lot pleasure).
source share