如果打印机不是默认打印机,PrintDialog 不会提取 windows 中设置的打印机的纸张尺寸

PrintDialog does not pull paper size of printer set in windows if printer not default

我的打印机需要使用与驱动程序默认尺寸不同的纸张尺寸。这已在 Windows 中正确配置。当我调用 PrintDialog 和 select 这台打印机并且 不是默认的 打印机时,纸张尺寸不正确。如果打印机是默认打印机,则正确的纸张尺寸为 selected。

Background: OS: Windows 10 Home Version 1803, build 17134.112 Printer: Epson TM-T6000

想出了一个办法,不是最好的,而是none较少的办法。创建一个 PrintDialog 以获取打印机名称,然后创建第二个 PrintDialog 并将 PrintQueue 设置为第一个打印机。