Does anyone know of a way to easily convert a PDF

2019-02-11 01:51发布

问题:

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?