rotativa

Why does Rotativa always generate my login page? Why is it slow?

假装没事ソ 提交于 2019-11-27 14:50:08
问题 I was using this Rotativa 1.6.4 code example to generate a PDF from a page in my .NET MVC 5 app. public ActionResult PrintIndex() { var a = new ActionAsPdf("Index", new { name = "Giorgio" }) { FileName = "Test.pdf" }; a.Cookies = Request.Cookies.AllKeys.ToDictionary(k => k, k => Request.Cookies[k].Value); a.FormsAuthenticationCookieName = System.Web.Security.FormsAuthentication.FormsCookieName; a.CustomSwitches = "--load-error-handling ignore"; return a; } public ActionResult Index(string

I am using Rotativa tool to display pdf. It works fine on localhost, But does not work on Azure platform

房东的猫 提交于 2019-11-27 07:21:46
问题 I am using Rotativa tool to display PDF. It works fine on localhost , But does not work on Azure platform. Below is my code... public ActionResult GeneratePDF(int id = 0) { ReportTransactionData reporttransactiondata = db.ReportTransactionDatas.Find(id); var viewFileToPrint = @"~/Views/ReportTranData/PDFReport.cshtml"; //var oRotativaPDF = new Rotativa.ViewAsPdf(); var oRotativaPDF = new Rotativa.PartialViewAsPdf(); try { if (reporttransactiondata == null) { return HttpNotFound(); } else { //

How do I intercept the output stream of the current actionresult in .NET MVC3?

烈酒焚心 提交于 2019-11-27 07:00:56
问题 Hi and thanks for looking! Background I am using the Rotativa pdf tool to read a view (html) into a PDF. It works great, but it does not natively offer a way to save the PDF to a file system. Rather, it only returns the file to the user's browser as a result of the action. Here is what that code looks like: public ActionResult PrintQuote(FormCollection fc) { int revisionId = Int32.Parse(Request.QueryString["RevisionId"]); var pdf = new ActionAsPdf( "Quote", new { revisionId = revisionId }) {