使用开源库将doc,docx文件转换为pdf [英] converting a doc,docx files to pdf using open source library

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

问题描述

我想将docx,doc文件上传到pdf文件以创建缩略图。我使用ghost脚本将pdf文件转换为图像并且它正常工作。我的服务器不包含office包,所以当我使用

i want to convert docx,doc files uploading to pdf files for creating thumbnails . I m using ghost script to convert a pdf file to image and it work properly.My server does not contain office package ,so when i use

Microsoft.Office.Interop.Word.dll

我收到错误,无法转换为PDF格式。 MS Office是否需要使用interop.word?还有其他开放的话题可以做同样的工作吗? Interop.word在我的本地机器上运行良好。是否有任何解决这个问题。很多帖子说服务器中需要MS字来使用interop.word.dll。我想知道这是正确的,如果是这样有任何开放的事情来做这个工作。或者os有任何其他方式从doc / docx文件创建图像

PLZ help

i got error and cant able to convert to pdf. whether MS Office is required to work with interop.word ?. Is there any other open sourse to do the same work?. Interop.word work very well in my local machine . Is there any to solve this problem .Many post says that MS word is required in Server to work with interop.word.dll. I want to know this is correct ,if so is there any open sourse to do the job.or os there any other way to create a image from doc/docx files
PLZ help

推荐答案

尝试使用pdfsharp它有很多功能
Try to use pdfsharp it has a lot of capabilities


如果你想使用Java代替,可以选择docx4j作为替代。净。以下是示例代码: https:// github。 com / plutext / docx4j / blob / master / src / samples / docx4j / org / docx4j / samples / ConvertOutPDF.java [ ^ ]
You can select docx4j as the alternative if you would like to use Java instead of .NET. Here is the sample code: https://github.com/plutext/docx4j/blob/master/src/samples/docx4j/org/docx4j/samples/ConvertOutPDF.java[^]


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

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