#45966 - 2003-09-24 03:02 AM
Capture Network Printouts
|
John
Fresh Scripter
Registered: 2001-09-27
Posts: 38
Loc: Canada
|
Ive been asked if there is a script or utility which will do the following:
Capture a printout from a win2k workstation and redirect it to a specific network printer based on the number of pages...
example: User prints to a network printer but since the number of pages is 25 pages or greater it gets automatically redirected to a another network printer...
Any suggestions or leads would be greatly appreciated...
thanks
John
|
|
Top
|
|
|
|
#45969 - 2003-09-24 03:55 AM
Re: Capture Network Printouts
|
John
Fresh Scripter
Registered: 2001-09-27
Posts: 38
Loc: Canada
|
Thank you for your quick response...
All workstations are win2k and printing to win2k print server in a Domain enviroment..Most or all of the applications would be office 2000, 90 percent of the prints would be coming from Word..
This is a bit of a odd request but i can see many advantages to this, if its possible...
Thank you in advance...
Cheers
John
|
|
Top
|
|
|
|
#45971 - 2003-09-24 04:14 AM
Re: Capture Network Printouts
|
John
Fresh Scripter
Registered: 2001-09-27
Posts: 38
Loc: Canada
|
I solution has to be seamless with no user intervention...
The VB script is perfect, now the question is how do we intercept the print job once the user hits that print button...
Cheers
John
|
|
Top
|
|
|
|
#45973 - 2003-09-24 04:33 AM
Re: Capture Network Printouts
|
John
Fresh Scripter
Registered: 2001-09-27
Posts: 38
Loc: Canada
|
I understand your train of thought and you do bring up a good point but the goal is to automate this procedure and possibly include print load balancing..
John
|
|
Top
|
|
|
|
#45975 - 2003-09-24 07:30 AM
Re: Capture Network Printouts
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Here you go.. Converted code (untested).
$strComputer = "." $objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\cimv2") $colItems = $objWMIService.ExecQuery("Select * from Win32_PrintJob",,48) For Each $objItem in $colItems ?"Caption: " + $objItem.Caption ?"DataType: " + $objItem.DataType ?"Description: " + $objItem.Description ?"Document: " + $objItem.Document ?"DriverName: " + $objItem.DriverName ?"ElapsedTime: " + $objItem.ElapsedTime ?"HostPrintQueue: " + $objItem.HostPrintQueue ?"InstallDate: " + $objItem.InstallDate ?"JobId: " + $objItem.JobId ?"JobStatus: " + $objItem.JobStatus ?"Name: " + $objItem.Name ?"Notify: " + $objItem.Notify ?"Owner: " + $objItem.Owner ?"PagesPrinted: " + $objItem.PagesPrinted ?"Parameters: " + $objItem.Parameters ?"PrintProcessor: " + $objItem.PrintProcessor ?"Priority: " + $objItem.Priority ?"Size: " + $objItem.Size ?"StartTime: " + $objItem.StartTime ?"Status: " + $objItem.Status ?"StatusMask: " + $objItem.StatusMask ?"TimeSubmitted: " + $objItem.TimeSubmitted ?"TotalPages: " + $objItem.TotalPages ?"UntilTime: " + $objItem.UntilTime Next
HTH,
Kent
|
|
Top
|
|
|
|
#45976 - 2003-09-24 10:21 AM
Re: Capture Network Printouts
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Here's one method.
Create a dummy printer queue, which always has printing suspended.
Poll the queue every x minutes, and if a job arrives which is under the maximum page count move it to the users local printer, otherwise move the job to the high capacity printer.
I'm assuming that there is a scriptable "move print job" call
The problem with this is that the dummy printer, local printer and high capacity printer will all need to use the same printer driver.
Another method would be to change the printer port used for each print job, but I can see quite a few problems with controlling that one.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|