Print spooler status

J

James Wong

Hi everybody,

I would like to know whether there is a method to know how many pending jobs
to be printed in print spooler from VB .NET 2005. My problem is that if a
large document is sent to printer, then another document is sent almost at
the same time, the second one may not print correctly. I'm using
PrintDocument to do the print job. So I want to know whether the previous
large one is finished, then send the second one to aviod this problem.

Does anybody has any idea on this issue? Thanks for your attention and
kindly advice!

Regards,
James Wong
 
W

Walter Wang [MSFT]

Hi James,

I'm not sure why the second document may not print correctly if sent almost
at the same time; this normally shouldn't be a problem. After all, a
network printer will be accepting multiple print jobs from different users
at the same time.

Anyway, to query the printer spooler (queue) status, you either need to use
WMI (search for win32_printer) or use API directly, such as this one:

#Merrion Computing Ltd - How to monitor a print spooler queue
http://www.merrioncomputing.com/Programming/VBDotNet/WatchPrinter.htm


Please feel free to let me know if there's anything unclear. Thanks.


Sincerely,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi James,

Would you please reply here to let me know the status of this post? Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top