public static void ProcessExportRequest(HttpContext context) { var writer = new PDFWriter(); var xml = context.Request.Form["grid_xml"]; xml = context.Server.UrlDecode(xml); writer.Generate(xml, context.Response); }
public ActionResult Generate() { var generator = new PDFWriter(); var xml = this.Server.UrlDecode(this.Request.Form["grid_xml"]); MemoryStream pdf = generator.Generate(xml); return(File(pdf.ToArray(), generator.ContentType, "grid.pdf")); }