Convert XPS to PDF in WPF C# application

后端 未结 3 403
挽巷
挽巷 2021-01-15 14:37

I need to convert an XPS file I create with my application to a PDF file, what is the best way to do so? I prefer this to be done from inside C# using a managed assembly.

相关标签:
3条回答
  • 2021-01-15 14:51

    An open source managed assembly might be hard to find, but you can look at tallcomponents.com for a commercial product that might help, You can have a look at GhostScript.com, its open source and supports both XPS and PDF, although you may have issues redistributing it without a license.

    0 讨论(0)
  • 2021-01-15 14:54

    Although it is not free, Amyuni PDF Creator .Net supports loading XPS files and saving them as PDF.

    Usual disclaimer applies.

    0 讨论(0)
  • 2021-01-15 15:06

    You can use the XpsDocument class to read the XPS files, then use a PDF library (such as Report.Net or #PDF) to export it. I used #PDF back in .NET 1.1, but not sure if it can be easily converted to .NET 2.0.

    #PDF: http://sharppdf.sourceforge.net/

    Report.NET: http://report.sourceforge.net/

    0 讨论(0)
提交回复
热议问题