【发布时间】:2018-05-02 17:44:08
【问题描述】:
在 Windows 10 中使用 Microsoft XPS Document Writer 将 PrintDocument 打印到文件总是抛出异常“句柄无效”。但在 Windows 7 中它运行良好。
PrinterSettings 更改为自定义页面大小时引发错误。在不更改 PrinterSettings 的情况下打印时不会出错。
谁能解释如何在 Windows 10 中执行的 C# Windows 窗体应用程序中解决此问题?
【问题讨论】:
-
请出示您的代码。我们需要能够复制问题。
标签: c# windows-10-desktop xpsdocument