rotativa

MVC5 application with Rotativa does not work when published on IIS

霸气de小男生 提交于 2019-12-12 01:39:31
问题 I am using Rotativa for convert the view to PDF. It works on my local but when published on IIS server it gives error as below: Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [Exception] Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches, String html) +1364 Rotativa.WkhtmltopdfDriver

Rotativa Value cannot be null. Parameter name: context

♀尐吖头ヾ 提交于 2019-12-12 01:13:53
问题 I am trying to use Rotativa to Generate a PDF and return the bytes, however I am getting the error: Value cannot be null. Parameter name: context Here is my code: public string getReportsPDF(string community, string procedure) { SiteSuperReportsController controller = new SiteSuperReportsController(); string value = ""; byte[] pdfBytes = new byte[] { }; if (procedure == "GetProductionTasks") { var actionPDF = new Rotativa.ActionAsPdf("RedBluePDF", new { community = community, procedure =

Rotativa 1.6.1 Image “ghosting” but only on QA, not dev or integration server

依然范特西╮ 提交于 2019-12-11 21:21:52
问题 I'm running a c# MVC 4 app , using Rotativa to convert Razor views to Pdfs. Rotativa is basically a wrapper around wkhtmltopdf. I upgraded to Rotativa 1.6.1, to fix a page break issue in wkhtmltopdf,, and my images are "ghosting". I rolled back to 1.5.0 and the problem went away (but page breaks are broken again). Looks just like in this wkhtmltopodf bug http://code.google.com/p/wkhtmltopdf/issues/detail?id=788 They claim it's fixed in the tip. (I tried manually updating to the latest stable

Unable to download PDF file with Rotativa in MVC4

混江龙づ霸主 提交于 2019-12-11 07:25:35
问题 I am using Rotativa to turn a Razor view into a PDF. The PDF file is not downloading. I can see it in Fiddler but the browser is not prompting for download - I have tried this with both IE and Chrome. I also tried to download the file to a physical path using the solution in this question here. but that didn't work either because of the system couldn't access the folder (Access Denied). Here is my code: public ActionResult Index() { var model = new CustomerDashboardVM(); return View("Index",

Rotativa ViewAsPdf not executing jquery

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 18:19:13
问题 I'm using Rotativa (v1.6.4) for converting an MVC view into a PDF. I have used jQuery in the View to show/hide certain text content. When I render the View, I see that jQuery is working, but when I render viewaspdf, the jquery is not working. I have added --debug-javascript --no-stop-slow-scripts --javascript-delay 10000 but this looks to be not working. Can someone help me here? Here is Controller detail: public ActionResult PrintBenificiaryForm() { PrintBenificiary p = new PrintBenificiary(

Using wkhtmltopdf with highcharts shows blank chart

那年仲夏 提交于 2019-12-10 10:43:10
问题 I'm attempting to use wkhtmltopdf via Rotativa to convert a basic html page which uses jquery and highcharts to render a demo chart. The chart renders correctly when displayed in a browser. Can anyone tell me what I'm doing wrong? This code results in a blank PDF. My view: <!DOCTYPE html> <html> <head> <title>Highcharts Test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style type="text/css

Using wkhtmltopdf with highcharts shows blank chart

强颜欢笑 提交于 2019-12-06 13:24:50
I'm attempting to use wkhtmltopdf via Rotativa to convert a basic html page which uses jquery and highcharts to render a demo chart. The chart renders correctly when displayed in a browser. Can anyone tell me what I'm doing wrong? This code results in a blank PDF. My view: <!DOCTYPE html> <html> <head> <title>Highcharts Test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style type="text/css"> #chart { float:left; width:300px; height:300px; } </style> <script src="//ajax.googleapis.com/ajax

Rotativa and wkhtmltopdf no CSS or images on iis6 over HTTPS, but fine on HTTP

南楼画角 提交于 2019-12-06 08:50:23
Using Rotativa, a .net wrapper for wkhtmltopdf. I can not get CSS or Images to render in a PDF if I connect Via HTTPS. I have previously set this up on 2008r2 iis7 server with HTTPS(SSL) I did have simular trouble with css & webfonts, but I just changed all the paths to absolute paths and it worked. This job is deployed on ii6 windows 2003 server. Yesterday it was just producing "An unhandled exception has occurred." when ussing HTTPS so I upgraded wkhtmltopdf to V 0.12.0, now the PDF will generate using ViewAsPdf, with no CSS or images. And using ActionAsPdf it renders a PDF of "You are not

Rotativa ActionAsPdf() Very Slow

ε祈祈猫儿з 提交于 2019-12-06 02:34:59
Using Rotativa 1.6.4 from NuGet and have noticed the following issue using the code below. ActionAsPdf hangs randomly for indeterminate amount of time. Code below that is hanging: var pdfResult = new ActionAsPdf("Report", new {id = Request.Params["id"]}) { Cookies = cookieCollection, FormsAuthenticationCookieName = FormsAuthentication.FormsCookieName, CustomSwitches = "--load-error-handling ignore" }; Background info that may help: The customSwitches is in use to ignore a documented issue calling wkhtmltopdf.exe using the ActionAsPdf, but it does not suppress errors in the code only in the

How to display page breaks in PDF generated by Rotativa

最后都变了- 提交于 2019-12-03 15:50:19
问题 In my ASP.NET MVC 4 app, I have an index view that has several partial views embedded in it. I installed latest version 1.6.1 of Rotativa via NuGet. Now I can print the index page to a PDF using Rotativa. I would like to have a page break in the PDF after every partial view. How can this be achieved using Rotativa? I tried to follow this example to use CustomSwitches but there does not seem to be one for page break. I used this article to generate the PDF 回答1: If you are using 1.6.1 you can