Wkhtmltopdf.NetCore-deprecated
Wkhtmltopdf.NetCore-deprecated copied to clipboard
Exception while trying getting bytearray from view
Hello, i'm trying to run the tool to generate pdf from razor view, but i am getting this error ;
Could not find an IRouter associated with the ActionContext. If your application is using endpoint routing then you can get a IUrlHelperFactory with dependency injection and use it to create a UrlHelper, or use Microsoft.AspNetCore.Routing.LinkGenerator.
PS: I am running this from a controller.
Please help.
Hi! did you see the example project? https://github.com/fpanaccia/Wkhtmltopdf.NetCore.Example
Could you upload an example of how you are using it?
@messaddek try setting Layout to null:
@{
Layout = null;
}