wpf PDFsharp 缺少 Xps 命名空间
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23785720/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PDFsharp missing the Xps namespace
提问by user928112
I need PDFsharp's XPS functionality to convert from WPF -> XPS -> PDF. I've tried referencing PDFsharp 1.20, 1.30, 1.31 and also 1.32, but none of these contain the mystical PdfSharp.Xpsnamespace that everyone is talking about. Apparently 1.31 was the last version to include the XPS functionality, but I didn't find anything in there either.
我需要 PDFsharp 的 XPS 功能来从 WPF -> XPS -> PDF 转换。我试过引用 PDFsharp 1.20、1.30、1.31 和 1.32,但这些都没有包含PdfSharp.Xps每个人都在谈论的神秘命名空间。显然 1.31 是包含 XPS 功能的最后一个版本,但我也没有在其中找到任何内容。
This is the one line of code I need it for:
这是我需要的一行代码:
//error: 'Xps' is not a member of 'PdfSharp'
var test = PdfSharp.Xps.XpsModel.XpsDocument.Open(_MemoryStream);
采纳答案by I liked the old Stack Overflow
The latest version that includes the XPS project is version 1.31.
包含 XPS 项目的最新版本是 1.31 版。
Downloads are available here:
https://sourceforge.net/projects/pdfsharp/files/pdfsharp/
可在此处下载:https:
//sourceforge.net/projects/pdfsharp/files/pdfsharp/
Get the file PDFSharp-MigraDocFoundation-1_31.zip and add the C# projects to your solution and reference these projects from your project.
获取文件 PDFSharp-MigraDocFoundation-1_31.zip 并将 C# 项目添加到您的解决方案并从您的项目中引用这些项目。

