在silverlight中将doc转换为pdf [英] word doc to pdf in silverlight

查看:126
本文介绍了在silverlight中将doc转换为pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Silverlight中将word doc转换为pdf?



将答案发送到我的邮件ID

[已删除电子邮件]

how to convert word doc to pdf in silverlight?

send answer to my mail id
[Email removed]

推荐答案

我使用Silverlight完成此操作的一种方法是在服务器上使用Office Automation并使用标准界面创建pdf字。这当然意味着转换部分在服务器上而不是在Silverlight中直接运行,因为您无法确定用户计算机上是否安装了特定版本的Office,或者即使它们运行的​​是Windows还是Mac。



另一种可能性是使用像itextsharp这样的东西来生成pdf文件。但您必须单独阅读Word文件。我也不喜欢那种方法,但我想我也会把它放在那里。
One way that I have done this using Silverlight is to use the Office Automation on the server and have it create the pdf using the standard interface from Word. This of course means that the conversion part runs on the server and not in Silverlight directly since you can never be sure if a particular version of Office is installed on the users machine or even if they are running Windows or Mac.

Another possibilty is to use something like itextsharp to generate the pdf files. But you would have to read in the Word file separately. I don''t like that method as well but I thought I would put it out there as well.


在服务器端使用Office Automation或Interop不是很好。请参阅:

http://support.microsoft .com / default.aspx?scid = kb; EN-US; q257757#kb2 [ ^ ]。



我宁愿推荐使用Open Office SDK:

http://www.microsoft.com/en-us/ download / details.aspx?id = 30425 [ ^ ]。



这样,您可以支持新的基于XML的Office格式(例如.DOCX,.XLSX), ECMA-376标准:

http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats [ ^ ] ,

http://en.wikipedia.org/wiki/Office_Open_XML [ ^ ]。



这样,您可以在没有安装Office的情况下工作。



关于转换为PDF,请参阅我过去的答案:问题将单词转换为PDF而不用offce或openoffice [ ^ ]。



-SA
Using Office Automation or Interop on server side is not very good. Please see:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^].

I would rather recommend using Open Office SDK:
http://www.microsoft.com/en-us/download/details.aspx?id=30425[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:
http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats[^],
http://en.wikipedia.org/wiki/Office_Open_XML[^].

This way, you can work without Office installed.

As to the conversion to PDF, please see my past answer: Question Convert word to PDF without offce or openoffice[^].

—SA


这篇关于在silverlight中将doc转换为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆