HELIOS developed an advanced printing system, to offer the latest printing technology to meet highest printing demands for enterprise and prepress environments. The HELIOS printing system is BSD LPR/LPD command line compatible. Some of its unique features are:
Separate process per spool job and print job
Unlimited job sizes per queue
Unlimited number of jobs
UTF-8/Unicode job name titles
Administration of the HELIOS print server is done remotely via HELIOS Admin from any Mac, Windows or UNIX machine:
Spool directories can be customized
Print jobs can be moved between spool queues
Print jobs can be reprinted and also be archived
The HELIOS printing system offers full error feedback by detailed printer log files
Print job event notification
Pipelining jobs into multiple print workflows
HELIOS LPR creates a print job in a spooling area for subsequent printing as facilities become available. Each print job consists of a control file and one or more data files.
The data files are copies of (or with the s parameter specified symbolic links to) each file name you specify. The spool area is managed by the “lpd” (Line Printer Daemon). Jobs that specify a printer on a remote machine are forwarded by “lpd”. “lpr” reads from the standard input if no files are specified.
“lpr”, which is responsible for passing print jobs to the appropriate printer, is used by the HELIOS Base printing service and is configured through the host configuration file “HELIOSDIR/var/conf/printcap”. This file contains an entry for each printer queue assigned to the system in order to define how the printer is connected to the network, and to specify which programs are responsible for transferring data to the printer.
The print job notification feature is used by the HELIOS Admin server, which receives a notification from the HELIOS notification server whenever a print job is deleted, started, stopped or if the status has changed. See Printer Jobs window in 7.9 “Printer Jobs window – moving, restarting, and deleting jobs”.
The HELIOS printing system derives from the LPR printing system. The figures below and on the next page show the workflow which print jobs usually take, considering the various types of printer queues.
The printer settings are best configured in HELIOS Admin
(Printer > Settings
). Fonts, PPDs
(PostScript Printer Description) and PostScript
initialization are stored in the “HELIOSDIR/var/spool/qmeta/<printer>”
directory. The spool directories are defined in the “printcap”
file (“HELIOSDIR/var/conf/printcap”).
The figure on the previous page gives an overview of the HELIOS printing system workflow. However, of course it is possible to combine two or more printer queues and, in doing so, gain more efficiency from the printing process. E.g., the printer queues can be configured so that successfully resolved print jobs are sent to a so-called “Hold” queue, whereas faulty print jobs are relocated to an “Error” queue.
Another possibility is to define printer queues in the process that employ more than one other queue and so save time and server resources:
By use of a “Clone queue” print jobs can be duplicated into multiple queues (see Fig. 15.1) which are defined in a group of printers.
* CTP = | Computer To Plate |
A “Balance queue” is used to set up a group of printers for load balancing – that is for shifting print jobs to a second or third printer in a group whenever the first printer is busy with a huge job (see Fig. 15.2).
* | next available queue in “Balance” group |
We recommend to select the same PPD for the “Balance queue” which is already assigned to the printers of this group. Otherwise the printing results may not be predictable.
The table below lists the HELIOS printer output interfaces and briefly describes their task/function. The column HELIOS product lists the HELIOS software product which supports the particular printer output interface.
Name | Function | HELIOS product license |
---|---|---|
balanceif | “Balance Group” driver | UNIX: EtherShare or PCShare or WebShare Windows: Base for Windows |
cloneif | “Clone” driver | UNIX: EtherShare or PCShare or WebShare Windows: Base for Windows |
diskif | “Print To Disk” driver | UNIX: EtherShare or PCShare or WebShare Windows: Base for Windows |
papif | “AppleTalk” driver | EtherShare or Base for Windows |
pcif | “TCP” driver | PCShare |
pdfif | “Create PDF” driver | PDF HandShake |
tcpif | “Remote LPR” driver | UNIX: EtherShare or PCShare or WebShare Windows: Base for Windows |
timeif | “Time” driver | UNIX: EtherShare or PCShare or WebShare Windows: Base for Windows |
viewif | “Print Preview” driver | PrintPreview |
smbif | “Windows Printer” driver | PCShare or Base for Windows |
lpr – send a job to the printer
HELIOSDIR/bin/lpr [-Pprinter ][-Ttitle ]
[-r][-m][-h][-s]
[-x option]
[filename ...]
lpr creates a printer job in a spooling area for subsequent
printing as facilities become available. Each printer job
consists of a control file and one or more data files. The data
files are copies of (or, with -s
, symbolic links to) each
filename you specify. The spool area is managed by the line
printer daemon, lpd. Jobs that specify a printer on a remote
machine are forwarded by lpd.
lpr reads from the standard input if no files are specified.
Send output to the named printer. Otherwise send output to the printer named in the environment variable PRINTER, or to the default printer lp.
Use the title
specified
as the print job title instead of the PostScript title. All job names are
handed over in Unicode/UTF-8 format.
Remove the file upon completion of spooling or upon
completion of printing with the -s
option.
Send mail upon completion.
Suppress printing the banner page.
Create a symbolic link from the spool area to the data files
rather than trying to copy them (so large files can be printed).
This means the data files should not be modified or
removed until they have been printed. This option can be
used to avoid truncating files larger than the maximum
given in the mx capability of the printcap entry.
-s
only prevents copies of local files from being made. Jobs from
remote hosts are copied anyway. -s
only works with named
data files; if the lpr command is at the end of a pipeline, the
data is copied to the spool area.
Pass options to the printer output interfaces. The options are stored in the control file (“cf” file) for the print job. When the job is printed, the options are set in the environment of the printer output interface as “HELIOS_XOPTION_key=value”.
It is possible to specify more than one -x
option on the
command line.
lprm – remove jobs from the printer queue
HELIOSDIR/bin/lprm [-Pprinter] [-] [user] [job ...]
lprm removes a job or jobs from a printer’s spooling queue. Since the spool directory is protected from users, using lprm is normally the only method by which a user can remove a job.
Without any arguments, lprm deletes the job that is currently active, provided that the user who invoked lprm owns that job.
When the super-user specifies a username, lprm removes all jobs belonging to that user.
You can remove a specific job by supplying its job number as an argument, which you can obtain using lpq. For example:
example% lpq -Phost host is ready and printing Rank Owner Job Files Total Size active wendy 385 standard input 35501 bytes example% lprm -Phost 385
lprm reports the names of any files it removes, and is silent if there are no applicable jobs to remove.
lprm kills the active printer daemon, if necessary, before removing spooled jobs; it restarts the daemon when through.
Display information about the queue for
the specified printer. In the absence of the -P
option, the queue to the printer
specified by the PRINTER variable in the environment is
used. If the PRINTER variable isn’t set, the queue for the
default printer is used.
Remove all jobs owned by you. If invoked by the superuser, all jobs in the spool are removed. (Job ownership is determined by the user’s login name and host name on the machine where the lpr command was invoked.)
Since race conditions are possible when updating the lock file, an active job may be incorrectly identified for removal by an lprm command issued with no arguments. During the interval between an lpq command and the execution of lprm, the next job in line may have become active; that job may be removed unintentionally if it is owned by you. To avoid this, supply lprm with the job number to remove when a critical job that you own is next in line.
Only the superuser can remove print jobs submitted from another host.
lpq – display the queue of printer jobs
HELIOSDIR/bin/lpq [-Pprinter][-l][+[n]][user...][job...]
lpq displays the contents of a printer queue. It reports the status of jobs specified by job or all jobs owned by the user specified by user. lpq reports on all jobs in the default printer queue when invoked with no arguments.
For each print job in the queue, lpq reports the user’s name, current position, the names of input files comprising the job, the job number (by which it is referred to when using lprm) and the total size in bytes. Normally, only as much information as will fit on one line is displayed. Jobs are normally queued on a “first-in-first-out basis”. File names comprising a job may be unavailable, such as when lpr is used at the end of a pipeline; in such cases the file name field indicates ‘‘(standard input)”.
If lpq warns that there is no daemon present (that is, due to some malfunction), the lpc command can be used to restart a printer daemon.
Print job names are displayed in UTF-8 encoding. The HELIOS “uniconv” tool (see 8.5 “uniconv”) can be used to convert the output into other encodings, e.g. ISO-8859-1.
Display information about the queue
for the specified printer. In the absence of the -P
option, the queue
to the printer specified by the PRINTER variable in the environment is used.
If the PRINTER variable isn’t set, the queue for the default printer is used.
Display queue information in long format; includes the name of the host from which the job originated.
Display the spool queue periodically until it empties. This option clears the terminal screen before reporting on the queue. If an interval is supplied, lpq sleeps that number of seconds in between reports.
lpc – line printer control program
HELIOSDIR/bin/lpc [command [parameter...]]
lpc controls the operation of the printer or of multiple printers, as described in the “HELIOSDIR/var/conf/printcap” database. lpc commands can be used to start or stop a printer, disable or enable a printer’s spooling queue, rearrange the order of jobs in a queue or display the status of each printer – along with its spooling queue and printer daemon.
With no arguments, lpc runs interactively, prompting with lpc>. If arguments are supplied, lpc interprets the first as a command to execute; each subsequent argument is taken as a parameter for that command. The standard input can be redirected so that lpc reads commands from a file.
Commands may be abbreviated to an unambiguous substring.
The printer parameter is specified just by the name of
the printer (as lw
), not as you would specify it to lpr
or
lpq
(not as -Plw
).
Display a short description of each command specified in the argument list, or, if no arguments are given, a list of the recognized commands.
Terminate an active spooling daemon
on the local host immediately and then disable printing (preventing new
daemons from being started by lpr) for the specified printers. The abort
command can only be used by the superuser.
Move a print job from
one printer queue on the host to another printer queue on the same host, optionally
with a given print job ID. The moveJob
command can only be used by the superuser.
Copy a print job from one printer
queue on the host to another printer queue on the same host, optionally
with a given print job ID. The copyJob
command can only be used by the superuser.
For jobs received by remote lpr, the fully qualified job ID must be specified as
listed by “lpq” with the -l
option.
List the number of entries in a given printer queue or – if no printer name is provided – in all existing printer queues.
Remove all files of incomplete print jobs from
the specified printer queue(s) on the local machine. The clean
command can only be used by the superuser.
Turn the specified printer queues off. This prevents
new printer jobs from being entered into the queue by lpr. The disable
command
can only be used by the superuser.
Turn the specified printer queue off, disable printing
and put message in the printer status file. The message does not need to be quoted, the remaining arguments
are treated like echo
. This is normally used to take a printer down and let others know why
(lpq indicates that the printer is down, as does the status
command).
The down
command can only be used by the superuser.
Enable spooling on the local queue for the listed
printers, so that lpr can put new jobs in the spool queue. The enable
command can only be used by the superuser.
Exit from lpc.
Attempt to start a new printer daemon. This is useful
when some abnormal condition causes the daemon to die unexpectedly leaving jobs in the queue. lpq
reports that there is no daemon present when this condition occurs. The restart
command can only be used by the superuser.
Print the job jobid
right after the job
predecessorid
. (This is also displayed by lpq.) If no predecessorid
is
specified, the job is printed first. The shiftJob
command can only be used by the superuser.
Enable printing and start a spooling daemon for the
listed printers. The start
command can only be used by the superuser.
Display the status of daemons and queues on the local machine for a given printer queue or – if no printer name is provided – for all existing printer queues. This command can be run by any user.
Stop a spooling daemon after the current job
completes and disable printing. The stop
command can only be used by the superuser.
Move the print job(s) specified by job ID or those
job(s) belonging to user to the top (head) of the printer queue. The topq
command
can only be used by the superuser.
Enable everything and start a new printer daemon.
Undoes the effects of down
. The up
command can only be used by the superuser.
The abbreviation you typed matches more than one command.
You typed a command or abbreviation that was not recognized.
You used a command that can be executed only by the superuser.
lpd – printer daemon
HELIOSDIR/sbin/lpd [-l]
lpd is the line printer daemon (spool area handler). It is usually invoked at boot time from the “start-helios” script, making a single pass through the printcap file to find out about the existing printers and printing any files left after a crash. It then accepts requests to print files in a queue, transfer files to a spooling area, display a queue’s status or remove jobs from a queue. In each case, it forks a child process for each request, and continues to listen for subsequent requests.
If a file cannot be opened, an error message is logged using the facility of syslog. lpd will try up to 20 times to reopen a file it expects to be there, after which it proceeds to the next file or job.
All TCP/IP remote LPR print jobs are only accepted by the
LPD daemon if access is granted in the “HELIOSDIR/var/conf/ipaccess” file. We recommend to
edit the “ipaccess” configuration file with HELIOS Admin (Settings > IP Access
).
To allow remote access to the LPD of a machine, independent of the entries in the main “ipaccess” list, it is possible to create a “HELIOSDIR/var/conf/ipaccess.lpd” file which will only be used by the LPD daemon.
To set up an “ipaccess.lpd” file you could do the following:
Copy the existing “ipaccess” file to “ipaccess.lpd”.
# cd /usr/local/helios/var/conf # cp ipaccess ipaccess.lpd
Then edit “ipaccess.lpd” for your needs.
Log valid requests received from the network. This can be useful for debugging purposes.
The lock file in each spool directory is used to prevent multiple daemons from becoming active, and to store information about the daemon process for lpr, lpq, and lprm.
lpd uses flock to provide exclusive access to the lock file and to prevent multiple daemons from becoming active simultaneously. If the daemon should be killed or die unexpectedly, the lock file need not be removed. The lock file is kept in a readable ASCII form and contains two lines. The first is the process id of the daemon and the second is the control file name of the current job being printed. The second line is updated to reflect the current status of lpd for the programs lpq and lprm.
After the daemon has successfully set the lock, it scans the directory for files beginning with cf. Lines in each cf file specify files to be printed or non-printing actions to be performed. Each such line begins with a key character that indicates what to do with the remainder of the line.
Job name to print on the burst page.
Classification line on the burst page.
Literal. This line contains identification information from the password file, and causes a burst page to be printed.
Title string for page headings printed by pr.
Host name of the machine where lpr was invoked.
Person. Login name of the person who invoked lpr. This is used to verify ownership by lprm.
Send mail to the specified user when the current print job completes.
Formatted File, the name of a file to print that is already formatted.
Like f, but passes control characters along, and does not make page breaks.
Name of a file to print using pr as a filter.
Troff File. The file contains troff output (cat photo-typesetter commands).
Ditroff File. The file contains device independent troff output.
DVI File. The file contains TEX output (DVI format from Stanford).
Graph File. The file contains data produced by plot.
Cifplot File. The file contains data produced by cifplot.
The file contains a raster image.
The file contains text data with FORTRAN carriage control characters.
Troff Font R. The name of a font file to use instead of the default.
Troff Font I. The name of the font file to use instead of the default.
Troff Font B. The name of the font file to use instead of the default.
Troff Font S. The name of the font file to use instead of the default.
Width. Changes the page width (in characters) used by pr and the text filters.
Indent. Specify the number of characters by which to indent the output.
Unlink. The name of file to remove upon completion of printing.
X options set with lpr -X
(parameters passed by
lpr -x
command).
Specifies the unique print job file inode number.
When a file is spooled for printing, the content is
copied into a data file in the spool directory. Data file
names begin with df. When lpr is called with the -s
option, the data file is a symbolic link to the
actual file.
The file minfree
in each spool
directory contains the number of kB to leave free so that the line printer
queue will not completely fill the disk.
printcap – printer capability database
HELIOSDIR/var/conf/printcap
printcap is a simplified version of the termcap database for describing printers. The spooling system accesses the printcap file every time it is used, allowing dynamic addition and deletion of printers. Each entry in the database describes one printer. This database may not be substituted for, as is possible for termcap, because it may allow accounting to be bypassed.
The default printer is normally lp, though the environment
variable PRINTER may be used to override this. Each
spooling utility supports a -P
printer option to explicitly
name a destination printer.
Each entry in the printcap file describes a printer, and is a line consisting of a number of fields separated by “:” characters. The first entry for each printer gives the names which are known for the printer, separated by “|” characters. Entries may continue onto multiple lines by giving a “\” as the last character of a line, and empty fields may be included for readability.
Capabilities in printcap are all introduced by two-character codes, and are of three types:
Capabilities that indicate that the printer has some particular feature. Boolean capabilities are simply written between the “:” characters, and are indicated by the word “bool” in the type column of the capabilities table below.
Capabilities that supply information such as baud-rates, number of lines per page, and so on. Numeric capabilities are indicated by the word num in the type column of the capabilities table below. Numeric capabilities are given by the two-character capability code followed by the “#” character, followed by the numeric value. The following example is a numeric entry stating that this printer should run at 1200 baud:
:br#1200:
Capabilities that give a sequence which can be used to perform particular printer operations such as print head movement. String valued capabilities are indicated by the word str in the type column of the capabilities table below. String valued capabilities are given by the two-character capability code followed by an “=” sign and then a string ending at the next following “:”, e.g.:
:rp=spinwriter:
is a sample entry stating that the remote printer is named spinwriter.
If an entry for a file or directory is not an absolute path (i.e. does not start with “/”) then the file or directory is relative to HELIOSDIR.
:af=var/adm/printer.acct:
Name | Type | Default | Description |
---|---|---|---|
af | str | NULL | name of accounting file |
br | num | none | if lp is a tty, set the baud rate (ioctl call) |
cf | str | NULL | cifplot data filter |
df | str | NULL | TEX data filter (DVI format) |
du | str | 0 | User ID of user “daemon” |
fc | num | 0 | if lp is a tty, clear flag bits |
ff | str | “\f” | string to send for a form feed |
fo | bool | false | print a form feed when device is opened |
fs | num | 0 | like “fc” but set bits |
gf | str | NULL | graph data filter (plot format) |
hl | bool | false | print the burst header page last |
if | str | NULL | name of input/communication filter (created per job) |
lf | str | “/dev/console” | error logging file name |
lo | str | “lock” | name of lock file |
lp | str | “/dev/lp” | device name to open for output |
nf | str | NULL | ditroff data filter (device independent troff) |
of | str | NULL | name of output/banner filter (created once) |
pl | num | 66 | page length (in lines) |
pw | num | 132 | page width (in characters) |
px | num | 0 | page width in pixels (horizontal) |
py | num | 0 | page length in pixels (vertical) |
rf | str | NULL | filter for printing FORTRAN style text files |
rm | str | NULL | machine name for remote printer |
rp | str | “lp” | remote printer name argument |
rs | bool | false | restrict remote users to those with local accounts |
rw | bool | false | open printer device read/write instead of write-only |
sb | bool | false | short banner (one line only) |
sd | str | “/var/spool/lpd” | spool directory |
sf | bool | false | suppress form feeds |
sh | bool | false | suppress printing of burst page header |
st | str | “status” | status file name |
tf | str | NULL | troff data filter (C/A/T phototypesetter) |
tr | str | NULL | trailer string to print when queue empties |
vf | str | NULL | raster image filter |
xc | num | 0 | if lp is a tty, clear local mode bits |
xs | num | 0 | like “xc” but set bits |
If the local line printer driver supports indentation, the daemon must understand how to invoke it.
[][Printers][lw8500][PAPPublish] flags=0 type=Boolean value=TRUE [][Printers][lw8500][SMBPublish] flags=0 type=Boolean value=TRUE [][Printers][lw8500][authenticate] flags=0 type=Boolean value=FALSE [][Printers][lw8500][papname] flags=0 type=String value=[19] p610-lw8500-spooler [][Printers][lw8500][SMBExportName] flags=0 type=String value=[6] lw8500 [][Printers][lw8500][SMBExportSpec] flags=0 type=String value=[38] bin/pcfilter lw8500 | bin/lpr -Plw8500
[][Printers][lw8500][entity] flags=0 type=String value=[44] LaserWriter 8500:LaserWriter@HELIOS Backbone [][Printers][lw8500][IfType] flags=0 type=String value=[5] papif [][Printers][lw8500][holdq] flags=0 type=String value=[12] printpreview [][Printers][lw8500][errorq] flags=0 type=String value=[5] error
lw8500:\ :lp=var/spool/qmeta/lw8500/device:\ :if=var/spool/qmeta/lw8500/if:\ :sh:\ :mx#0:\ :sf:\ :du#0:\ :sd=/var/spool/lw8500:\ :af=var/adm/printer.acct:\ :lf=/var/spool/lw8500/lw8500-log:
HELIOSDIR/var/conf/printcap |
printer capabilities database |
HELIOSDIR/var/conf/Preferences |
interface output options |
HELIOSDIR/var/conf/ipaccess |
TCP/IP access list for remote access to the LPD |
HELIOSDIR/var/run/lpd.lock |
“PID” for master LPD daemon |
HELIOSDIR/var/run/lpd.fifo |
communication socket file |
HELIOSDIR/sbin/lpd |
line printer daemon |
HELIOSDIR/sbin/*if |
HELIOS printer drivers |
/var/spool/* |
directories used for spooling |
/var/spool/*/cf* |
daemon control files |
/var/spool/*/df* |
data files specified in “cf” files |
/var/spool/*/tf* |
temporary copies of “cf” files |
/var/spool/*/ef* |
print job error file |
/var/spool/*/vf* |
print job PDF view file, e.g. PDF from “PrintPreview” or “Create PDF” spool queue |
/var/spool/*/.seq |
sequence ID of next job |
/var/spool/*/lock |
“PID” of the queue LPD daemon |
/var/spool/*/*-log |
queue log file in spool directory |
/var/spool/*/status |
text status file of current print job |
HELIOSDIR/var/spool/qmeta/*/PPD |
PPD file for spooler/device |
HELIOSDIR/var/spool/qmeta/*/FONTS |
PostScript fonts of device |
HELIOSDIR/var/spool/qmeta/*/SETUP |
printer setup file to be included in every PostScript job |
The following description is only for HELIOS Base services running on Windows.
Mac OS X uses the PAP or TCP printing system, UNIX systems use Remote LPR. Windows printing is based on SMB/CIFS. HELIOS print monitor manages forwarding SMB/CIFS print jobs into the HELIOS printing system. During the HELIOS software installation it is automatically installed into the Windows system. The required driver is described in the Driver section below.
Create a Windows printer that prints to a HELIOS queue:
Go to Start > Printers and Faxes > Add a printer.
Select Local printer attached to this computer
and click
the Next >
button. From the Use the following
port
pop-up menu select a HELIOS queue (Fig. 15.3).
The selected printer must be marked as (HELIOS Queue
),
compare pull-down menu entries in Fig. 15.3)!
Select the printer manufacturer and model from the lists and
click Next >
.
As proposed by the wizard, you should keep the already
existing printer driver. Otherwise you must specify a new
printer driver later. Click Next >
.
Name the printer and specify whether you want to make the
printer the default printer. Click Next >
.
Select printer sharing and specify a printer share name or
just accept the proposed name (for shared printer names,
Windows only allows up to 8 characters). Click Next >
.
You may optionally enter information on the printer location
(for example “HELIOS_Windows”) and comments. Click Next >
.
Specify if you wish to print a test page (e.g. to verify the
HELIOS print monitor installation). Click Next >
.
The “Add Printer Wizard” gives you a summary of the
printer settings. Click Finish
to complete the installation.
Now the new printer appears in the “Printers and Faxes” window (Fig. 15.4).
During the HELIOS software installation, via the start-helios -i
command, the HELIOS print monitor driver
“HELIOSPrinterMon_s.dll” (or – depending on the architecture – “HELIOSPrinterMon64_s.dll”)
is copied from “HELIOSDIR\etc\printmon” into
the “WINDOWS\system32” folder.
Sometimes the driver is busy in the Windows folder so that updating the “HELIOSPrinterMon_s.dll” does not work. Reboot, then try again.
The Windows TCP/IP Print Server may interfere with the HELIOS LPR if print jobs are received via the “Remote LPR“ protocol. This is because it uses the same port (515). The HELIOS LPR can only work correctly if the Windows TCP/IP Print Server is turned off:
On Windows, open Start > Administrative Tools > Computer Management > Services and Applications > Services.
Select the TCP/IP Print Server
item from the list, open it and
click the Stop
button in the Service status
section. To
permanently disable the TCP/IP Print Server service, select
Disabled
from the Startup type
pull-down menu (Fig. 15.5).
After all settings have been done, click the OK
button.