fpanaccia / Wkhtmltopdf.NetCore-deprecated

Rotativa + Net Core
The Unlicense
220 stars 94 forks source link

_generatePdf.GetByteArrayViewInHtml(htmlView,data) not working #44

Closed thanhnamrei closed 2 years ago

thanhnamrei commented 3 years ago
Sotolotl commented 3 years ago

Did you ever get to the bottom of this/find a work-around? I'm having the same problem.

thanhnamrei commented 3 years ago

Did you ever get to the bottom of this/find a work-around? I'm having the same problem.

no, i used Haukcode.WkHtmlToPdfDotNet nuget, but it's not support cshtml => pdf, only html to pdf

Sotolotl commented 3 years ago

Ah, that's a shame. Thanks for the suggestion, I'll look into it :)

tyler-boyd commented 3 years ago

I ran into this too, and found this related issue. Adding Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation to the project that is doing the view rendering fixed the issue for me.