-
June 14th, 2009, 12:21 PM
#1
How to find out the printer has finished?
Hi All,
I'm creating a windows forms application.
I do printing in it.
I need to know exactly when the printer has finished printing and how.
I tested many codes but found no solution for it.
Could you please help me solve this issue?
Thanks in advance!
-
June 14th, 2009, 05:03 PM
#2
Re: How to find out the printer has finished?
Hello,
If .net technologies are being used then a "PrintSystemJobInfo" object contains an "IsCompleted" member that returns a boolean value.
There is also an "EndPrint" event - part of the PrintDocument class that might be useful
Peter
-
June 15th, 2009, 01:39 AM
#3
Re: How to find out the printer has finished?
Hi Peter,
I do know about that, but my target is detecting when exactly phisical printer completes printing.
EndPrint event has been raised when last printer page is rendered on the printer's graphics.
But it still far away from the printer itself.
Using IsCompleted of PrinterJobInfo I see a print job as completed right away it has been sent from printer spooler to the printer, but printer may be out of paper so it is actually is not completed.
Thank you
-
June 15th, 2009, 05:07 AM
#4
Re: How to find out the printer has finished?
Hello,
There's also a "GetJob" API call:
http://msdn.microsoft.com/en-us/libr...94(VS.85).aspx
To use it though, you need to have a JobId number that is for your document being printed - it should hopefully return "JOB_STATUS_PRINTED" as part of the JOB_INFO structure when document is finished.
Peter
-
June 30th, 2009, 09:13 AM
#5
Re: How to find out the printer has finished?
The only absolute way to determine if the printer has finished is to ask it - which I'm afraid is outside of driver / spooler control. You'll need to use an SNMP query to the device.
-
July 1st, 2009, 05:07 PM
#6
Re: How to find out the printer has finished?
Hi the_cat,
I wanna know if SNMP is possible for USB printers.
I also need some sample code.
Regards
-
July 2nd, 2009, 03:15 AM
#7
Re: How to find out the printer has finished?
SNMP is not supported for USB so you would need another method. Maybe look into retrieving the printed status from the printer through PJL as USB is bi-directional? I don't have any sample code but check out this website http://www.undocprint.org/start which has links to not only USB but also the Printer Job Language (the manual for which can be downloaded from HP: http://spp.austin.hp.com/SPP/Public/...cDownload.aspx )
-
July 27th, 2009, 02:11 AM
#8
Re: How to find out the printer has finished?
oh, you can use JOB_INFO2
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|