0
Ich verwende Rotativa-Ressourcen, um PDF-Dateien von meiner HTML-Seite in einem MVC ASP.NET-Projekt zu erstellen. Hier ist mein Code:Rotativa HTML zu PDF auf ASP.NET MVC: Wie erstellt man PDF als Landschaft?
Controller:
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult ExportPDF()
{
return new ActionAsPdf("Index")
{
FileName = Server.MapPath("~/Content/Relato.pdf")
};
}
}
Ansicht
<a href="@Url.Action("ExportPDF","Home")" class="hidden-print" >EXPORT PDF</a>
Die PDF-Dokumente im Hochformat-Layout erstellt werden, sind. Wie könnte ich sie in ein Landschaftslayout setzen?
Prost!