[Asp.net]常见word,excel,ppt,pdf在线预览方案,有图有真相,总有一款适合你!(续)

转自:http://blog.csdn.net/binyao02123202/article/details/20203367

 

在上一篇博文[Asp.net]常见word,excel,ppt,pdf在线预览方案,有图有真相,总有一款适合你!中,园友们对在office文档,pdf在线预览,又提出了几种方案,作为上篇文章的续篇,收录另外几种方式。也为园友们多提供几种方案,在实际项目中,可根据用户的服务器环境,选择一个更适合的解决方案

还有非常感谢大家的支持!

方案七

Office Web Apps方式:

由于本人对sharepoint一窍不通,实在没办法理解,这里推荐几篇文章,对sharepoint了解的朋友,可以参考一下。

@yu.恒
看好 Office Web Apps, 在线阅读、编辑、还可以多人在线同时协同编辑

@annpaul
可以使用微软的Office Web App组件,可以在线浏览主流的office文档,并且可以支持编辑等操作,Excel里面的公式也能支持一部分。如果想体验效果,可以到OneDrive里进行体验。并且可以跟自己的应用进行集成,相关资料可自行搜索。

 

http://technet.microsoft.com/zh-cn/library/ff431687(office.14).aspx

http://www.cnblogs.com/poissonnotes/p/3238238.html

http://www.cnblogs.com/poissonnotes/p/3242545.html

http://www.cnblogs.com/janet/p/3179709.html

http://www.cnblogs.com/poissonnotes/p/3277280.html

方案八

将PDF转化为Image:Ghostscript-API

参考:http://www.codeproject.com/Articles/32274/How-To-Convert-PDF-to-Image-Using-Ghostscript-API

方案九

使用Aspose组件,收费

@BinSys
方法2,3,4,5,6都被我否了,后来找到Aspose.Words,是个好方案,(除了花美元以外)。

@双鱼座
从没遇到这个问题,感觉根本就不是个问题。服务器上安装Office是个10多年前就被MS否决掉的方案,完全不靠谱。
Aspose所有的控件都支持导出为图片、PDF、Html,就是所谓的Render功能。这方面Aspose做得最好,Syncfusion的差一些,支持的格式少一些,效率差一些。最好的方案就是不落地的方案。Office的方案不仅落了地,还沉到地底下去了。

@倚天照海- -
Aspose.Total_for_.NET_DLL 这个牛叉

方案十

pdf.js基于html5

参考:http://www.oschina.net/p/pdfjs

 @StanZhai
  pdf.js

方案十一

 viewer.js

参考:http://viewerjs.org/

@龙宜坡

Viewer.JS must be the easiest way to use presentations, spreadsheets, PDF's and other documents on your website or blog without any external dependencies. No tricks, no conversions, no unexpected downtime from external services, and no plugins required – it happens to work just fine in all major...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
【核心代码】 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 using Aspose.Cells; using Aspose.Slides.Pptx; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Text; using System.Web.Http; namespace DocOnlineView.UI.Controllers.MVCAPI { public class HomeController : ApiController { [HttpGet] public DataTable CourseViewOnLine(string fileName) { DataTable dtlist = new DataTable(); dtlist.Columns.Add("TempDocHtml", typeof(string)); string fileDire = "/Files"; string sourceDoc = Path.Combine(fileDire, fileName); string saveDoc = ""; string docExtendName = System.IO.Path.GetExtension(sourceDoc).ToLower(); bool result = false; if (docExtendName == ".pdf") { //pdf模板文件 string tempFile = Path.Combine(fileDire, "temppdf.html"); saveDoc = Path.Combine(fileDire, "viewFiles/onlinepdf.html"); result = PdfToHtml( sourceDoc, System.Web.HttpContext.Current.Server.MapPath(tempFile), System.Web.HttpContext.Current.Server.MapPath(saveDoc)); } else { saveDoc = Path.Combine(fileDire, "viewFiles/onlineview.html"); result = OfficeDocumentToHtml( System.Web.HttpContext.Current.Server.MapPath(sourceDoc), System.Web.HttpContext.Current.Server.MapPath(saveDoc)); }

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值