protected override byte[] CallTheDriver(ControllerContext context) { // use action name if the view name was not provided string viewName = ViewName; if (string.IsNullOrEmpty(viewName)) { viewName = context.RouteData.GetRequiredString("action"); } ViewEngineResult viewResult = GetView(context, viewName, MasterName); string html = context.GetHtmlFromView(viewResult, viewName, Model); byte[] fileContent = WkhtmltoimageDriver.ConvertHtml(this.WkhtmlPath, this.GetConvertOptions(), html); return(fileContent); }
protected override byte[] WkhtmlConvert(string switches) { return(WkhtmltoimageDriver.Convert(this.WkhtmlPath, switches)); }