On Jan 30, 2016, at 3:31 PM, Malik Brahimi <mbrahim...@gmail.com> wrote:
> 
> I've been looking through the win32print API but I do not believe that all 
> the Windows features are fully exposed in this package. Is there a way for me 
> to trigger a callback function once the print server or USB printer receives 
> a print job such that I can obtain that print job's id?

The Windows printing APIs are steeped in the mists of antiquity and mired in 
backward compatibility much, and are generally among the least well designed in 
the API set.

I’m not sure what you are expecting to get.  What do you think that a print job 
ID looks like, and what do you think you will be able to do with it?  Remember 
that it’s quite possible to configure a Windows printer without the spooler, so 
that jobs go straight to the printer.  In that case, there will never be an ID 
of any kind.

You can certainly use win32print.StartDocPrinter, and that does return an 
identifier, but I don’t know what good that does you.
— 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to