我正在尝试使用 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 Document。我现在使用的是 Gembox.Pdf 的免费版本。
我已经联系了 Gembox.Pdf 团队并在 Gembox 论坛上发帖,但到目前为止我还没有收到任何回复。
最佳答案
此问题已通过最新的错误修复版本得到解决:
https://www.gemboxsoftware.com/pdf/nightlybuilds/GBA15v1156.zip
或者这个最新的预发布 NuGet 包:
安装包 GemBox.Pdf -版本 15.0.1156-hotfix
关于c# - 在 C# 中使用 Gembox.Pdf 打印 pdf 时,打印队列中的 documentName 始终为 'XPS Document',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67901760/