Does anyone know of a way to easily convert a PDF to a docx format programmatically

佐手、 提交于 2019-12-18 18:07:30

问题


We have a couple 3rd party systems that give us PDFs. We would like to convert those PDFs for display on the web without using an Adobe product. Ideally we would like to use Silverlight to render the PDFs but are having trouble converting from a PDF to Xaml or using docx format as a middle man. There are lots of libraries that give PDFs but that is not what we need.

If there is a library out there that does this, a .net lib would be preferable but we can run the conversion using the command line as well if that is an option.


回答1:


Aspose sells .Net converter libraries.




回答2:


Convert PDF to SVG (ghostscript will do it) and import that as a series of images: I'm not a .net programmer, but I understand that can be done with the system.io.packaging class, which, for what it's worth, is implemented outside of .net by the Mono project.




回答3:


Another option, if you don't actually need to change anything in the pdf documents you can use pdf.js which renders pdf documents as html 5. For more info please see this blog post.

http://andreasgal.com/2011/06/15/pdf-js/




回答4:


There are a number of converters from PDF to XPS which is a subset of XAML.

[update] some reference links

  • What Is The Structure Of a XPS File
  • XPS or XAML viewer to embed in .NET app?


来源:https://stackoverflow.com/questions/2192400/does-anyone-know-of-a-way-to-easily-convert-a-pdf-to-a-docx-format-programmatica

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!