简体   繁体   English

无法打开Windows GDI打印机驱动程序

[英]Couldn't open Windows GDI printer driver

I have virtual printer installed which prints through redirected port and sends document to real printer via gsview\\gsprint.exe. 我安装了虚拟打印机,该打印机通过重定向端口进行打印,并通过gsview \\ gsprint.exe将文档发送到实际打印机。 It works normally when I use gsprint from a normal C++ application. 当我从普通的C ++应用程序使用gsprint时,它可以正常工作。 But if call the same thing through a windows service (run as SYSTEM), it gives following error. 但是,如果通过Windows服务(以SYSTEM身份运行)调用同一件事,则会出现以下错误。 It sees the printer but perhaps doesn't have access to it. 它可以看到打印机,但可能无法访问它。 I am on windows 10 but windows 7 also has the same issue. 我在Windows 10上,但Windows 7也有同样的问题。 How can I solve this problem? 我怎么解决这个问题?

2006-02-24 gsprint 1.9 Couldn't open Windows GDI printer driver Requested printer: "SupplyDep" 2006-02-24 gsprint 1.9无法打开Windows GDI打印机驱动程序请求的打印机:“ SupplyDep”

Available printers: "Send to OneNote 2010" "VirtualPrinter" "SupplyDep" "Microsoft XPS Document Writer" "Fax" 可用的打印机:“发送到OneNote 2010”“ VirtualPrinter”“ SupplyDep”“ Microsoft XPS Document Writer”“传真”

I ran into a similar issue trying to run gsprint as the NT Authority/system user. 我在尝试以NT Authority /系统用户身份运行gsprint时遇到了类似的问题。 The last post in this link helped a lot. 链接中的最后一篇文章有​​很大帮助。 Basically I setup the printer under my user and then I copied the registry entries for the printer to the default user. 基本上,我在用户下设置打印机,然后将打印机的注册表项复制到默认用户。

Below are the registry keys I copied from HKEY_CURRENT_USER to HKEY_USERS\.DEFAULT

    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts
    HKEY_CURRENT_USER\Printers

You'll need to restart the Print Spooler service (or just restart the server) in order for the changes to take effect. 您需要重新启动Print Spooler服务(或仅重新启动服务器),以使更改生效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM