我正在尝试使用Rotativa将.html文件打印为.pdf文件。我已经尝试了以下代码:
我的索引操作在这里:
return new ActionAsPdf("Index") { FileName = "Product.pdf" };
我的索引操作在这里:
public ActionResult Index()
{
return View(db.Products.ToList());
}
但是,生成的.pdf
文件被下载而不是预览。我不想下载它。我想要预览并打印。