| <%@ Page Language="C#" Debug="true" %> <% byte[] wfrImg = null; int n_page = 1; int n_type = WFR2025.IMAGETYPE.PNG; int n_width = 0; int n_height = 0; string s_value; try { int.TryParse(Request.QueryString["P"], out n_page); int.TryParse(Request.QueryString["W"], out n_width); int.TryParse(Request.QueryString["H"], out n_height); s_value = Request.QueryString["V"]; using(WFR2025.WfrCommand wfrObj = new WFR2025.WfrCommand(WFR2025.CT.SERVER)) { wfrObj.Open(Server.MapPath("sample_graph.wfr")); wfrObj.Import("#1", WFR2025.IT.STR, s_value, "", "Field=off"); wfrObj.Create(); wfrImg = wfrObj.GetPageImage(n_page, WFR2025.IMAGETYPE.PNG, n_width, n_height); Response.ContentType = "image/png"; Response.BinaryWrite(wfrImg); } } catch(Exception ex) { Response.ContentType = "text/plain"; Response.Write("ERROR" + ex.Message); } wfrImg = null; %> |