How to get the Print Job Status

How do I get the status of a document that is being printed, and how do I get the amount of pages, and how much pages have already been printed?
I have searched the google, but i couldn't find it
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I guess it depends on what programming language you are using you should be able to translate the following example into other languages:

Visual Basic:

IbrahimHussainAuthor Commented:
But I need this in 2005.
In 2005 you must do the following:
'System.Drawing.Printing Namespace
'(See here:
Imports System.Drawing.Printing

'Create a PrintDocument Object
'(see here:
objPrintDoc = New PrintDocument()

'Start a print job by calling the print() function

'The PrintDocument object fires the PrintPage event
'(see here:
' which provides the PrintPageEventArgs Object
'(See here:

Private Sub objPrintDoc_PrintPage(ByVal sender As Object, _
ByVal e As PrintPageEventArgs) Handles objPrintDoc.PrintPage
' (Printing code left out.)
End Sub



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
One thing to remember is that when you send a document to the printer it is actually spooled (cached), which may effect your responses.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.