开发者

Wrong dmCopies value when printing from Microsoft Word

I'm writing tool, that monitors printers. I need to get printed pages count for the job. I'm using printer events system (FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification, ...).

I can get DEVMODE structure with dmCopies value (JOB_NOTIFY_FIELD_DE开发者_JAVA百科VMODE). But this value is incorrect when Microsoft Word are used to print documents. This related with Word bug (feature). Word are fixed this bug with SP (http://support.microsoft.com/kb/919736/en-us). But SP is not always can be installed on the system.

How can I get correct dmCopies value?

One solution is to read spool files (SPL) and get correct DEVMODE structure from them. But for that it is need to support RAW printers formats (PCL, PostScript, ESC-P, CaPSL, Prescribe, ...) (because some printers generates spool files only in RAW).

Maybe anyone knows other solution?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜