0

Im working on a .NET Core Web Application. I need to creata a PDF from HTML. My idea is to use a controller and view to make the HTML and then convert it to PDF.

How do i call the controller and make it return the HTML inside the project instead of serving it.

The html wont be sent to a client. Only used to create an HTML. Maybe a controller/view is not the way to go?

Daarwin
  • 2,896
  • 7
  • 39
  • 69
  • 3
    Possible duplicate of [Render Razor View to string in ASP.NET Core](http://stackoverflow.com/questions/32558941/render-razor-view-to-string-in-asp-net-core) – Luke May 12 '17 at 08:19
  • You may read thoroughly in [this link](http://stackoverflow.com/questions/21495273/convert-html-to-pdf-in-asp-net-mvc). May be it will help you.Thank you. – orbit May 12 '17 at 08:50
  • @orbit thanks but its not the conversion to PDF im stuck with currently. Rather how to render HTML from a view without it being a server request. – Daarwin May 12 '17 at 08:53
  • Confused with the question and your comment above - want to create html of the view in controller ? Or want to create html from view ? – Shan May 12 '17 at 20:13
  • can you show what did you try ?? @Lautaro – Abi May 14 '17 at 13:03

0 Answers0