摘要: public void ReadPDF(string category) { string pathD = @"D:/pdf/" + category; if (File.Exists(pathD)) { byte[] bts = File.ReadAllBytes(pathD);//把pdf文件转换为二进制流 string base64String = Convert.ToBase64String(bts);//把二进制流转换为base64 byte[] newbts = Convert.FromBase64String(base64String);//把base64转化 阅读全文
posted @ 2011-10-13 15:43 xuebingz 阅读(329) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 将word转换为pdf /// </summary> public void DOCConvertPDF() { Microsoft.Office.Interop.Word.Application appClass = new Microsoft.Office.Interop.Word.Application(); appClass.Visible = false; Object missing = System.Reflection.Missing.Value; Document wordDoc = new Document(); 阅读全文
posted @ 2011-10-13 15:41 xuebingz 阅读(402) 评论(1) 推荐(0) 编辑
摘要: WebClient webClient; Uri urimx = new Uri("http://.............."); string path2 = @"D:\Text\"; webClient = new WebClient(); webClient.Credentials = CredentialCache.DefaultCredentials;//获取或设置用于对向Internet资源的请求进行身份验证的网络凭据。 Byte[] pageData = new Byte[] { }; try { pageData = webClient 阅读全文
posted @ 2011-10-13 10:16 xuebingz 阅读(215) 评论(0) 推荐(0) 编辑