You are on page 1of 11

www.pharos.

com

T E C H N O T E

Print Routing in Uniprint

Routing is the process of moving a print job from a source place to a destination place. This
document describes the routing options possible with Pharos Uniprint.

Uniprint Routing Procedure


Pharos Uniprint does not allow users to directly select a printer. Instead, users may select a Pharos
Spool Queue and Uniprint then routes the job to an appropriate printer using a series of rules.

Figure 1: Simplified Uniprint routing

Pharos Print
Print job
Service
Pharos Print

 Pharos Service
Printer
Spool Queue
Queue

Uniprint uses either:


 Automatic routing, which f ollows a def ault set of rules built into the Print Service.
 Decision-based routing, which allows the administrator to def ine rules f or overriding the
def ault Uniprint routing process.

For the Uniprint routing procedure to be ef f ective, ensure that users cannot bypass the system and
gain direct access to a printer.

About Spool Queues


A Pharos Spool Queue is an intermediate component that sits between a user and a printer. The
Spool Queue resides in the Pharos Print Service and is an essential part of the Pharos Uniprint
system.

The spool is a logical object in the Pharos Database but resides as a physical object in the operating
system.

In non-Uniprint environments, the printer is identif ied in the print dialog box when a job is printed. In
Uniprint environments, the print dialog box discloses the Pharos Spool Queue, which may carry the
same name as the printer or may carry a f unction-related title such as Staf f Printer or Student Printer
or Lab B Printer. From the user’s point of view, however, there is little dif ference except that their job
may not always print on the same printer.

In a direct printing environment, the Spool Queue receives print job requests f rom one or more
workstations and processes them in the order in which they are received . Where users must release
print jobs f rom a Pharos Station, the Spool Queue holds each print job until the release instruction is
received.

A number of properties other than specif ic printers can be associated with Spool Queues, including
popup questions, third party charging options and printing costs. For example, the Spo o l Queue

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

costs each print job according to the charging method associated with the queue and any applicable
Discount Rate Schedules.

Af ter processing, the Spool Queue routes jobs immediately to a printer in a direct printing
environment or holds jobs in a spooled environment, f or release by a user at a designated station,
the Pharos Station. In both cases, the Pharos system makes a decision on where to print the job.

Steps in the Default Routing Process


Step One: Establishing printer-spool queue relationships
The administrator conf igures each printer and each Spool Queue separately in the Printing context
of Pharos Administrator and associates one with the other. Typically, the relationship is one-to-one
or one-to-many, but many-to-one and many-to-many relationships are valid.

The list of printers associated with each Spool Queue is theref ore the set of printers that the
Administrator is allowing users printing to that queue to use.
Step Two: Determining operational printer(s)
When a job is printed to a Spool Queue, the Print Service reviews the list of printers associated with
that queue to determine which are currently in an operational state. For example, the Print Service
eliminates as a possibility any printer that is out of paper, jammed or has the toner drawer open.
Step Three: Matching attributes
From the list of associated, operational printers, the Print Service eliminates any which do not
support the attributes required by the print job, f or example A4, duplex.
Step Four: Load balancing
The Print Service assesses the available printers according to the load balancing rules 1:
 If all printers are the same speed, the rule is even workload. Uniprint distributes the work
evenly to ensure that all printers wear at the same rate
 If the printers are dif f erent speeds, the rule is f astest delivery. Uniprint sends the work to the
printer that can deliver the job in the f astest possible time. This does not necessarily mean
that the job goes to the f astest printer, but depends on the current workload of each printer.
Step Five: Allocating a printer
Based on each step above, the Print Service identif ies the best printer f or the job.

At this point, the Administrator can override the routing process, using the SelectPrinter Plug -in (see
Decision-Based Routing). If a dif f erent set of rules have been scripted, the Print Service raises the
Select Printer Event, which calls the SelectPrinter Plug -in. The service passes along to the plug-in all
the inf ormation about the job.
Step Six: Printing the job
The job is printed on the chosen printer.

Decision-Based Routing
Scripted routing may be based on any inf ormation that Uniprint gathers on the print job:
 User
 Location
 Device
 Job size
 Job type e.g. paper size, duplex requirement

1 Load balancing operates based on the configured printer speed (weight) of each printer. This property is set per printer
in the Printer Tab in the Properties window at Pharos Administrator > Printing > Print Services> name of Print Service >
Printers.
2

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

 Popup options e.g. f inishing-level of document


 Any other inf ormation that can be collected using a script, f or example, time of day

Scripts can be any of UniScript (the custom Pharos scripting language), DOS batch script, a Delphi/
C/ C++/ VB program, Java or other relevant scripting language.

The script breaks the def ault routing procedure described above between steps f ive and six, and re -
routes the job to a printer based on the pre-determined, scripted attributes. In some cases, the
def ault printer may still be the best choice.

See the Appendix f or two sample scripts.


Example: Draft quality
A popup question asks the user whether the print job is a draf t, a copy or a f inal version. If the job is
a draf t or a copy, a script breaks the recommended printer and routes the job to a draf t quality
printer.
Example: Large jobs
A large library site with multiple f loors has a single high-end printer (40+ ppm) per f loor together with
several 16 ppm printers spread over the f loor. Each small printer has a Pharos Station alongside.
Users print to a common Spool Queue and release the job f rom the closest Pharos Station. Uniprint
automatic routing ensures each print job goes to the printer associated with the Pharos Station from
which it is released, unless the job exceeds a pre-determined number of pages. For every print job
exceeding say, 10 pages, a script breaks the recommended printer and diverts the job to the larger
printer on the f loor, and of f ers a discount on the job to compensat e f or the inconvenience of having
to collect the job a little f arther away.

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

Figure 2: Single Spool Queue distributes print job to any printer based on the Pharos Station from which the job is
released. If the job exceeds a scripted maximum size, the job is re-routed to the high-end printer.

Workstation Workstation

Workstation Workstation

Spool Queue
High-end laser printer

Pharos Station w ith


laser printer

Pharos Station w ith


laser printer

Pharos Station w ith


laser printer

Pharos Station w ith


Pharos Station w ith laser printer
laser printer

Routing Options
There are a number of basic configurations:
 Single queue to printer job exchange
 Single queue to multiple printers
 Multiple queues to single printers
 Multiple queues to multiple printers

Single Spool Queue to Printer


The standard and most basic layout is easy to set up. Simply establish the Spool Queue - print er
relationship (step one of the routing process above) and any job printed to the queue is routed to the
associated printer, via a Pharos Station if applicable.

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

Figure 3: Single Spool Queue to printer (direct printing)

Workstation

Spool Queue
Printer

Workstation

Figure 4: Single Spool Queue to printer (spooled printing)

Workstation

Spool Queue
Pharos Station w ith
printer
Workstation

Single Spool Queue to Multiple Printers


Use a single spool queue when all print jobs are to be costed or otherwise treated equivalently.
Uniprint load balancing applies.

Figure 5: Single Spool Queue with multiple printers in a direct printing environment

Workstation

Workstation
Printer
Spool Queue
Laser printer

Workstation
Laser printer

Workstation

Example: A spooled environment


A site with 6,000 users and over 200 computers has several computer laboratories spread around
the site, all joined by a reliable high-speed network. Each laboratory f eatures:
 one or more printers
 a Pharos Station beside each printer, although in the main laboratory one Pharos Station has
two printers attached

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

The site uses a single spool queue meaning users can select ‘File/ Print’ f rom anywhere on the site,
and can go to any laboratory to print their job. The job prints on the printer beside the Pharos Station
f rom which it is released i.e. the printer ‘controlled’ by the Pharos Station.

Volume is f airly low at about 400,000 print jobs per year, and the site has a less than three second
response time to a print request.

Figure 6: A single Spool Queue in a spooled environment where print jobs can be released from any Pharos Station.
Laboratory B is particularly busy, but the load balancing capability of Pharos UnipriNT ensures jobs are distributed evenly
between the two printers.

Workstation

Lab A

Workstation
Pharos Station w ith
Spool Queue tw o printers

Lab B
Workstation
Pharos Station w ith
laser printer

Workstation

Multiple Spool Queues to Single Printer


Use multiple spool queues f or f lexibility, even with a single printer. Dif f erent Spool Queues may carry
dif f erent print cost structures, popup questions f or gathering inf ormation or third party charging. For
example, in a learning environment a direct Spool Queue may charge printing at a discounted price
and use third party charging to allow departmental budgets to be charged f or special projects, while
a student Spool Queue may charge a f ull price f or user-pays printing.

Figure 7: Multiple Spool Queues serving a single printer. Jobs printed to the direct queue bypass the Pharos Station and
print immediately. Jobs printed to the spooled student queue do not print until manually released at the Pharos Station.

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

Multiple Spool Queues to Multiple Printers


Where a variety of f inishing options and/ or costing models exist, multiple queues supporting
specialist printing f acilities allow users some choice.

Figure 8: A specialist Spool Queue serving the color printer, and two general queues provide options for users.

B & W Direct
Spool Queue
B & w printer

Workstation
User Group 1 Color Direct
Spool Queue
Color printer

Workstation B&W
User Group 1 Spooled Queue
Pharos Station w ith
laser printer

Figure 9: Separate user groups access the same set of printers using dedicated Spool Queues.

Workstation Workstation
User Group 1 User Group 2
High-end laser printer

Workstation Workstation
User Group 1 Spool Queue User Group 2
Spool Queue
User Group 1 User Group 2
Pharos Station w ith
laser printer

Workstation Workstation
User Group 1 User Group 2
Pharos Station w ith
laser printer

Workstation Workstation
User Group 1 User Group 2
Laser printer

Example: Environment with mixed operating systems


A university site is a set of walk-in laboratories and classrooms. The site includes:
 a mix of Windows, Macintosh, UNIX and mainf rame systems
 three laboratories spread around the campus. The main laboratory has f our rows of
computers, each with a Pharos Station and printer at the end, plus an area containing
Macintoshes with an Apple LaserWriter. The Apple LaserWriter is also used f or UNIX
and Mainf rame printing.
 three classrooms each containing a set of computers and a printer

A Spool Queue is conf igured f or each row of computers in the laboratories, and f or each classroom.
In the laboratories, the jobs printed f rom any PC in a row appear only on the Pharos Station at the
7

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

end of that row. Jobs printed in a classroom appear only on the Pharos Station in the classroom.
Jobs printed f rom the mainf rame, UNIX or f rom any of the Macintoshes go to a separate Spool
Queue, which directs jobs to the Pharos Station beside the Apple LaserWriter.

Figure 10: Multiple solutions in a complex environment

Macintosh
Macintosh Spool Queue

Lab
PCs
Macintosh

Mac/ Unix Pharos Row Spool


Station w ith
printer
Queue

Unix
Unix Spool
Queue Row Pharos Station w ith
printer
Unix

Further Information

Uniprint printing process


See the document Print System Components located on the Pharos CD at
Help\Uniprint\printcom.htm, or in Pharos Online Help at Uniprint > Print System D iagrams.

Select Printer Plug-in


See the document Plug-ins located on the Pharos CD at Help \Base\plugins.htm, or in Pharos
Online Help at System Management > Plug -ins & Scripts > Plug-ins.

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

Appendix: Sample Scripts

Redirect Large Jobs Script


// SelectPrinter plug-in to redirect large print jobs
//
// Change the values below to customize
//
new f ast_printer = ""; // Put the name of a f ast printer here
new max_pages = 100; // Jobs of this many pages or more

// Is this print job large?


//
if (PlugIn.JobPages > max_pages)
{
// Yes, this print job is huge!
// Redirect to a f ast printer
//
PlugIn.Printer = f ast_printer;
}

Choose Printer Script


SelectPrinter plug-in to choose the output printer
//
// Notes:
//
// (1) Direct queue output printer selection is assumed
//
// (2) This script will wait f or the user to choose
// a printer and during this time no other jobs will
// be processed in this direct queue. This may
// decrease throughput signif icantly, theref ore this
// script is not suitable f or high volume direct queues
//
// (3) To be f unctionally usef ul this script requires that
// both the PHAROS Popup and PHAROS Notif y clients
// be installed on the machines f rom which jobs are printed
//
// Change the values below to customize
//
new timeout = 20; // Wait at most this long f or user input
new timeout_f ail = true; // Whether job f ails if timeout occurs
new cancel_f ail = f alse; // Whether job f ails if user selects Cancel
new prompt = "Please select a printer";
new description = "This printer will be used to print job '" +
PlugIn.JobName + "'";
if (cancel_f ail)
description += ". Select 'Cancel' to delete this job";

// Is this a direct queue job?


// (Otherwise the user is at a PHAROS Station)
//
9

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

if (PlugIn.Direct)
{
// Yes, this is a direct queue job
// Make sure we have namespace f unctions we need
//
import "Notif y"; // We need PHAROS Notif y f unctions
import "PrintJob"; // We need to access print job popup inf o
import "String"; // We need a string f unction

// Now we need the IP address of the computer the job


// was printed f rom. This requires "StaticNotif yIP" popup
// inf ormation, which will be inserted if the popup client
// detects the PHAROS Notif y client running on the
// machine the job was printed f rom
//
new host = PrintJob.GetPopupData( // This f unction gets
// popup inf ormation
PlugIn.Queue, // The queue and ...
PlugIn.JobID, // the ID identif y the source job
"StaticNotif yIP"); // We want the value of this f ield

// Did we get a value?


// (Otherwise there may be no popup inf ormation or
// no PHAROS Notif y client)
//
if (not String.IsEmpty(host))
{
// Yes, we have the IP address of the computer the
// source job came f rom
//
// Now ask the user to select a printer
//
new new_printer = ""; // Must be a string
new result = Notif y.QuestionBoxList( // Ask with a list
// question box
host, // The user's computer
prompt, // The prompt to show
description, // The description
timeout, // The time to wait f or user input
PlugIn.Printer, // The def ault option
new_printer, // The user's choice (if any)
PlugIn.Printers); // The list of option strings

// Did the user make a choice?


//
if (result == 1)
{
// Yes, so use the chosen printer
//
PlugIn.Printer = new_printer; // Set the new printer
}
else if ((result == 0) and cancel_f ail)
{
// No, user selected cancel, so f ail the job
10

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E
Pharos Systems International, Inc. TechNote: Print Routing in Uniprint
_____________________________________________________________________________________________________________

//
PlugIn.Result = f alse;
PlugIn.Error = "User cancelled printer selection";
}
else if ((result == -1) and timeout_f ail)
{
// No, question box timed out, so f ail the job
//
PlugIn.Result = f alse;
PlugIn.Error = "Printer selection timeout";
}
}
}

© 2002 Pharos Systems International, Inc. All rights reserved. Pharos and Uniprint are registered trademarks and
SignUp, Off-The-Glass and Blueprint are trademarks of Pharos Systems International, Inc. All other brands and th e i r
products are trademarks of their respective holders and should be noted as such.

11

TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O T E TT E
E C
C H
H N
N O
O TT E
E T E C H N O
T E

You might also like