I am trying to use NRecosite HTML to PDF generator.
Whenever it comes to
new NReco.PdfGenerator.HtmlToPdfConverter()
it throws exception
FileNotFoundException: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
[HttpPost]
public async Task<IActionResult> Login(RegistrationModel model, CommandType command)
{
int selectedTab = 9;
if (command == CommandType.SignApplication)
{
selectedTab = 10;
string htmlContent = await GetHtml(model.Review.PublishUrl);
var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter();
var pdfBytes = htmlToPdf.GeneratePdf(htmlContent);
return File(pdfBytes, "application/pdf", "dd.pdf");
}
RegistrationManager mgr = new RegistrationManager(_registrationRepository);
var registrationModel = await mgr.CreateLoginModel(model.FormId, model.LeadId, selectedTab);
return registrationModel.IsRegistrationDisbaled ? View("Error", "The link is disabled for this account") : View("Index", registrationModel);
}