在 Silverlight 中显示 Office 文档
我需要在基于浏览器的 Silverlight 应用程序中显示 Office 文档。我现在采用的解决方案涉及使用 Office Automation 将各种 Office 文档转换为 XPS,然后使用 用于 Silverlight 的 FirstFloor 文档工具包。
这可行,但速度很慢,并且有相当多的移动部件。最值得注意的是,由于所有已知和明显的原因,办公自动化部分特别不稳定。
我能想到的最好的选择是购买类似 Aspose.Total 来处理文档->XPS 转换块。但 Aspose 相当昂贵(对于我们的场景来说至少是 8K 美元),主要是因为它附带了很多我并不真正需要的功能。如果有必要的话我会付钱,但在付钱之前,我想看看其他人是否有更好的想法。
关于如何实现这一目标的建议?基本上,我需要允许用户将 Word/Excel/Powerpoint 文档上传到服务器,并在基于浏览器的 Silverlight 应用程序中显示它们(只读即可)。有什么我错过的解决方案吗?
编辑:看起来Electric Rain有一个PPT到XAML转换器,可以至少值得研究 PPT 文件。
编辑:FirstFloor Document Toolkit 的另一个替代品似乎是 PDFTron SilverDox 产品。看起来它的服务器组件使用 Office Automation,但是一旦您将文档导入 XPS,它的客户端 Silverlight 查看器似乎就可以工作了。
I've got a need to display Office documents in a browser-based Silverlight application. The solution that I've got in place right now involves using Office Automation to convert the various Office docs to XPS, and then displaying the resulting XPS files in Silverlight with the FirstFloor Document Toolkit for Silverlight.
This works, but it's slow, and has a fair number of moving parts. Most notably, the Office Automation piece is particularly unstable, for all the known and obvious reasons.
The best alternative I can come up with is to purchase something like Aspose.Total to handle the document->XPS conversion piece. But Aspose is fairly expensive (at least $8K for our scenario), largely because it comes with a lot of functionality that I don't really need. I'll pay that if I have to, but before I do, I want to check to see if anyone else has any better ideas.
Suggestions on how to accomplish this? Basically, I need to allow users to upload Word/Excel/Powerpoint docs to a server, and display them (read-only is fine) in a browser-based Silverlight application. Any solutions out there that I've missed?
Edit: It looks like Electric Rain has a PPT-to-XAML converter that might be worth investigating for PPT files at least.
Edit: Another alternative to the FirstFloor Document Toolkit looks to be the PDFTron SilverDox product. It looks like its server component uses Office Automation, but once you get the doc into XPS, it looks like its client-side Silverlight viewer would work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Rainbow PDF 提供服务器解决方案,售价 2000 美元 http://rainbowpdf.com/server-based-solutions
: )
Rainbow PDF has server solution for $2000 http://rainbowpdf.com/server-based-solutions
:)
我遇到了这个问题,所以我以编程方式将 Word 文档转换为 PDF。我现在需要在浏览器中调用同名PDF文件。 (Doc1.docx 至 Doc1.pdf)您可以使用变量来调用文档。这是 C# 后端代码,可以很好地完成此任务。另请记住添加对 Microsoft Word 12.0 对象库的引用。调用此方法或将其作为一个类。然后调用该文档。
I had this issue, so I converted the Word Docs to PDF programatically. I now need to call the same name PDF file in the browser. (Doc1.docx to Doc1.pdf) You can use variables to call the documents. This is C# backend code that does the trick nicely. Also remember to add the reference to the Microsoft Word 12.0 Object Library. Call this method or make it a class. Then call the document after that.