Rotativa.Demo.Controllers.HomeController.TestView C# (CSharp) Метод

TestView() публичный Метод

public TestView ( ) : ActionResult
Результат ActionResult
        public ActionResult TestView()
        {
            // The more usual way of using this would be to have a Model object that you would pass into ViewAsPdf
            // and work with that Model inside your View.
            // Good example could be an Order Summary page on some fictional E-shop.

            // Probably the biggest advantage of this approach is that you have Session object available.

            ViewBag.Message = string.Format("Hello {0} to ASP.NET MVC!", "Giorgio III.");
            return new ViewAsPdf("Index")
                       {
                           FileName = "TestView.pdf",
                           PageSize = Size.A3,
                           PageOrientation = Orientation.Landscape,
                           PageMargins = { Left = 0, Right = 0 }
                       };
        }