使用 ITextSharp 生成 XPS 文档而不是 PDF?
我正在使用 ITextSharp 生成 PDF 文件。是否也可以生成 XPS 文件?如果是的话,怎么办?
找不到任何文档。谢谢!
I'm using ITextSharp to generate PDF files. Is it also possible to generate XPS files? And if yes, how?
Can't find any documentation. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iTextSharp 是专门为生成 PDF 文件而构建的库,因此不会为您创建 XPS 文件。 System.Windows.Xps 命名空间为您提供了编写 XPS 文档的方法来自 .net 3.5 及更高版本的代码。
iTextSharp is a library specifically built to generate PDF files, so that is not going to create XPS files for you. The System.Windows.Xps namespace provides you with methods for writing XPS documents from your code for .net 3.5 and higher.
想法:您可以尝试使用 iTextSharp 创建 PDF,然后使用 GhostScript 将其转换为 XPS,然后打印到 XPS 打印机驱动程序?
An Idea: You could try creating the PDF using iTextSharp, then converting it to XPS using GhostScript to print to an XPS printer driver?