How to get the Print Job Status

Hi,
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
Thanks
IbrahimHussainAsked:
Who is Participating?
 
gemartiCommented:
In VB.net 2005 you must do the following:
+++++++++++++++++++++++++++++
'System.Drawing.Printing Namespace
'(See here: http://msdn.microsoft.com/en-us/library/system.drawing.printing%28v=VS.100%29.aspx)
Imports System.Drawing.Printing

'Create a PrintDocument Object
'(see here: http://msdn.microsoft.com/en-us/library/t2ds3xzt%28v=VS.100%29.aspx)
objPrintDoc = New PrintDocument()

'Start a print job by calling the print() function
objPrintDoc.Print()

'The PrintDocument object fires the PrintPage event
'(see here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx)
' which provides the PrintPageEventArgs Object
'(See here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs.aspx)

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

++++++++++++++++++++++++++++++++++++++++++++++++++++

0
 
gemartiCommented:
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: http://support.microsoft.com/kb/202480

0
 
IbrahimHussainAuthor Commented:
Thanks,
But I need this in VB.net 2005.
0
 
OrcbighterCommented:
One thing to remember is that when you send a document to the printer it is actually spooled (cached), which may effect your responses.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.