You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
Version Number of Plugin: 3.0.2
Version of VS: Microsoft Visual Studio 2019 V. 16.6.5
Target Framework: .NET Core 3.1
Steps to reproduce the Behavior
Add services.AddWkhtmltopdf(); to startup.
Add IGeneratePdf to constructor.
Call GetByteArrayViewInHtml(view, model) and receive the respective value for the pdf generated.
Expected Behavior
Calling GetByteArrayViewInHtml(view, model) should return the pdf generate in a byte array format.
Actual Behavior
Calling GetByteArrayViewInHtml(view, model) instead throws the below exception:
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.
Code snippet
This is the snippet in my controller:
var resPDF = await _pdfGenerator.GetByteArrayViewInHtml<ReportInEditViewModel>("PDFTemplates/Report", model);
Bug Information
Version Number of Plugin: 3.0.2
Version of VS: Microsoft Visual Studio 2019 V. 16.6.5
Target Framework: .NET Core 3.1
Steps to reproduce the Behavior
services.AddWkhtmltopdf();
to startup.IGeneratePdf
to constructor.Expected Behavior
Calling GetByteArrayViewInHtml(view, model) should return the pdf generate in a byte array format.
Actual Behavior
Calling GetByteArrayViewInHtml(view, model) instead throws the below exception:
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.
Code snippet
This is the snippet in my controller:
var resPDF = await _pdfGenerator.GetByteArrayViewInHtml<ReportInEditViewModel>("PDFTemplates/Report", model);
This is a section of my view:
Final Comments
Any help would be greatly appreciated! 😉
The text was updated successfully, but these errors were encountered: