开发者

PrintDocument (c#) ignores printer configuration

开发者 https://www.devze.com 2022-12-11 23:43 出处:网络
I\'ve got a few logical printers configured and pointing to the same physical printer. Each logical printer is configured with a specific input and output tray. Opening a document, e.g. a pdf, and pri

I've got a few logical printers configured and pointing to the same physical printer. Each logical printer is configured with a specific input and output tray. Opening a document, e.g. a pdf, and printing to any one of these printers results in a correct input/ouput print. However i've developed a windows service (win2003) and when i use the PrintDocument class to print, the printer ignores the configuration of the target logical printer and just prints using (it would appear) default settings (e.g. any input tray => top output tray). I'v开发者_C百科e tried the same service on an XP machine and it all works fine.

Any ideas?

Thanks Sean


Ok seems the problem is the printer configuration settings are user specific. So once i logged in as the user that the service is running under, configured the printer - all worked fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消