是否有任何将XPS转换为PDF的开放工具?

编程入门 行业动态 更新时间:2024-10-26 18:26:15
本文介绍了是否有任何将XPS转换为PDF的开放工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我做了很多工作,以找出将 XPS 文档转换为 PDF 的简便方法.有许多工具可以做到这一点,但它们并非免费的.有免费的替代品吗?

I did a lot of digging to figure out an easy way to convert an XPS document into a PDF. There are many tools that can do this but they are not free. Is there a free alternative?

推荐答案

一个快速的Google搜索使我想到了: www.nathanpjones/wp/2013/03/output-to-pdf-in-wpf-for-free/

A quick google search led me to this: www.nathanpjones/wp/2013/03/output-to-pdf-in-wpf-for-free/

在我剪掉一些不需要的代码后,我能够使它工作.结果如下:

I was able to get it to work after I trimmed down some of the code I did not need. Here is the result:

using (PdfSharp.Xps.XpsModel.XpsDocument pdfXpsDoc = PdfSharp.Xps.XpsModel.XpsDocument.Open(xpsPath)) { PdfSharp.Xps.XpsConverter.Convert(pdfXpsDoc, pdfPath, 0); }

2个路径变量只是字符串.

The 2 path variables are just strings.

您需要引用以下两个dll: www.nathanpjones/wp/wp-content/uploads/2013/03/PdfSharpXpsBin.zip

You need to reference these 2 dll's: www.nathanpjones/wp/wp-content/uploads/2013/03/PdfSharpXpsBin.zip

非常感谢Nathan共享此信息!

Many thanks to Nathan for sharing this information!

内森作品以NuGet包的形式提供这里.

Nathan work is available as a NuGet package here.

更多推荐

是否有任何将XPS转换为PDF的开放工具?

本文发布于:2023-05-26 06:54:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/252259.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   有任何   工具   XPS   PDF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!