使用adobe组件转换,rt

解决方案 »

  1.   

    读取源HTML文件
    byte[]   downloadBytes   =   SomeMethond(url);获取源文件
                    System.Web.HttpResponse   response   =   System.Web.HttpContext.Current.Response;
                    response.Clear();
                    response.AddHeader( "Content-Type ",   "binary/octet-stream ");
                    response.AddHeader( "Content-Disposition ",
                            "attachment;   filename= "   +   downloadName   +   ";   size= "   +   downloadBytes.Length.ToString());
                    response.Flush();
                    response.BinaryWrite(downloadBytes);
                    response.Flush();
                    response.End();