c# - 在 C# 中使用 Gembox.Pdf 打印 pdf 时,打印队列中的 documentName 始终为 'XPS Document'

标签 c# pdf printing gembox-document gembox-pdf

我正在尝试使用 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 的免费版本。

print queue

我已经联系了 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/

相关文章:

c# - C# WPF 中的只读复选框

android - 如何将pdf转换为图像?

r 如何保留自定义类的打印方法

c# - printdocument 添加空白页

c# - 如何在应用程序设置中存储对象列表

c# - 在 Xamarin 中为 UITextField 正确设置背景图片

C# - 更改任务栏的图标

pdf - XSL FO 内联对齐

php - TCPDF pdf 中的特定字体

c - C中打印Trie的内容和数量