-1
I have followed the recommended settings in the documentation, performed several searches, I have no error in the example but the report is not generated. Initially I did the installation of :
Install-Package Rotativa.AspNetCore -Version 1.2.0-beta
Startup Setup
RotativaConfiguration.Setup(env.WebRootPath, "Rotativa");
Example of my Home controller (Inside the Home folder, I have a View with the name = Visualizarpdf)
public class Person
{
public Guid Id { get; set; }
public string Name { get; set; }
public string LastName { get; set; }
}
public IActionResult RotativaPDF()
{
Person person = new Person()
{
Id = Guid.NewGuid(),
Name = "Primeiro",
LastName = "Ultimo"
};
var relatorioPDF = new ViewAsPdf
{
ViewName = "VisualizarPDF",
IsGrayScale = false,
FileName = "Fornecedor.pdf",
PageOrientation = Rotativa.AspNetCore.Options.Orientation.Landscape,
PageSize = Rotativa.AspNetCore.Options.Size.A4,
Model = person
};
return relatorioPDF;
}
public IActionResult Index()
{
RotativaPDF();
return View();
}