webgio / Rotativa

Rotativa, /rota'tiva/. Make Pdf from Asp.Net MVC. Available on Nuget https://www.nuget.org/packages/Rotativa
http://letsfollowtheyellowbrickroad.blogspot.it/search/label/Rotativa
MIT License
622 stars 220 forks source link

Remove header from ViewAsPdf??? #157

Open faceoffers28 opened 7 years ago

faceoffers28 commented 7 years ago

Is there an easy way to remove the header? The page header appears in the PDF file if the page is behind a login (see attached image).

capture10017

Here is my code.

return new ViewAsPdf()
            {
                FormsAuthenticationCookieName = System.Web.Security.FormsAuthentication.FormsCookieName,
                //Cookies = cookies,
                ViewName = "_Invoice",
                Model = model,
                FileName = "NAME_Invoice.pdf",
                PageSize = Rotativa.Options.Size.A4,
                PageOrientation = Rotativa.Options.Orientation.Portrait,
                //CustomSwitches = "--print-media-type --header-center \"text\""

            };

Any help is much appreciated. Thanks!