0

I tried to get Pdf Docs from my IActionResult method using APIs like RazorPdf,MvcPdfActionResult,PerfectPdf... But none is working for me. I am Developing an Application in ASP.NET Core MVC.

Are there any supported APIs for generating Pdfs from Controller Actions....?

2
  • 2
    If you found a solution, post it as answer and mark it as accepted. Do not update your question with the solution! Commented Jun 20, 2016 at 13:52
  • Thank @Tseng I am new to StackOverflow.. Commented Jun 23, 2016 at 3:03

1 Answer 1

1

MvcPdfActionResult worked for me with... I just had to change the ViewName.

Instead of passing it directly, I tried giving it's relative path like ~/Views/PdfView.cshtml.

The actual code looks like this...

return new PdfActionResult("~/Views/PdfView.cshtml", modelobject)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.