c# - 在 C# 中使用 Gembox.Pdf 打印 pdf 时,打印队列中的 documentName 始终为“XPS Document”
问题描述
我正在尝试在 C#(.NET Framework 4.8)中使用 Gembox.Pdf 打印 pdf 文档。这是我使用的代码:
public void PrintPdf(string fileToPrint, string printerName, string jobName)
{
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
using (var document = PdfDocument.Load(fileToPrint))
{
document.Print(printerName, new PrintOptions
{
DocumentName = jobName
});
}
}
我作为 jobName 传递的内容并不重要,当我查看打印队列时,我总是会看到 Xps 文档。我现在正在使用 Gembox.Pdf 的免费版本。
我已经联系了 Gembox.Pdf 团队并在 Gembox 论坛上发帖,但到目前为止我没有收到任何回复。
解决方案
使用此最新的错误修复版本解决了此问题:
https ://www.gemboxsoftware.com/pdf/nightlybuilds/GBA15v1156.zip
或者这个最新的预发布 NuGet 包:
Install-Package GemBox.Pdf -Version 15.0.1156-hotfix
推荐阅读
- kotlin - net.corda.nodeapi.internal.persistence.CouldNotCreateDataSourceException:无法创建数据源
- javascript - React Native(Android):无法通过 JNI 在作业中返回字符串
- c++ - 使用矢量化数据进行高效的并行张量收缩
- python-3.x - Sympy TypeError - 无法将浮点对象解释为整数
- vue.js - 如何使用项目 id 而不是索引来设置 Vue.set
- google-cloud-platform - 应用需要访问客户谷歌云项目
- sql-server - 使用 unix bash 脚本连接 SQL Server 的方法
- c++ - 模板参数推导不一致
- r - 无效类“corMatrix”对象:“sd”插槽具有非有限条目:lmer() R
- python - 路由器的python脚本