HELIOS developed an advanced printing system, to offer the latest printing technology to meet the 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,
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 queue, 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 its 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 following figures 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
initializations 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 above 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 “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.
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).
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 |
---|---|---|
balanceif | “Balance Group” driver | HELIOS Base |
cloneif | “Clone” driver | HELIOS Base |
diskif | “Print To Disk” driver | HELIOS Base |
papif | “AppleTalk” driver | EtherShare |
pdfif | “Create PDF” driver | PDF HandShake |
tcpif | “Remote LPR” / “HELIOS TCP” | HELIOS Base |
timeif | “Time” driver | HELIOS Base |
viewif | “Print Preview” driver | PrintPreview |
smbif | “Windows Printer” driver | PCShare |
lpr – send a job to the printer
HELIOSDIR/bin/lpr [-Pprinter][-Ttitle]
[-r][-m][-h][-s]
[-x option]
[file ...]
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
file 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 encoding.
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.
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.
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. This 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. This 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. This 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. This 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. This command can only be used by the superuser.
Turn the specified printer queue off, disable printing
and put message in the printer status file. This is normally used to take a printer down and let others know why
(lpq indicates that the printer is down, as does the lpc status
command).
This 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. This 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. This 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. This command can only be used by the superuser.
Enable printing and start a spooling daemon for the listed printers. This 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. This 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. This command can only be used by the superuser.
Enable everything and start a new printer daemon.
Undoes the effects of down
. This 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 waiting print jobs. 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 in 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 banner page.
Classification line on the banner page.
Literal. This line contains identification information from the password file.
Title string for page headings printed by pr (print files).
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.
File name. The name of the file which is being printed, or a blank for the standard input.
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 (print files) 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 (print files) 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 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 features. 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 or number of lines per page. 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 does not contain an absolute path (i.e. does not start with “/”) then the file or directory is relative to “HELIOSDIR”.
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 banner 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 |
[][Printers][lw8500][TCPPublish] flags=0 type=Boolean value=TRUE [][Printers][lw8500][SMBPublish] flags=0 type=Boolean value=TRUE [][Printers][lw8500][tcpname] 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][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 addresses the interconnection of the server side Windows printing system with HELIOS Base running on Windows.
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 the HELIOS print monitor driver “HELIOSPrinterMon64_s.dll” is copied into the “WINDOWS\system32” folder.
Sometimes the driver is busy in the Windows folder so that updating the “HELIOSPrinterMon64_s.dll” does not work. Reboot, then try again.
Open “Devices and Printers” from the Windows “Control Panel”.
Click on the Add a printer
button.
Windows Server 2012 tries to find a printer on the network automatically.
Skip this by clicking on The printer that I want isn't listed
.
Select Add a local printer
.
From the Use an existing 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.
As proposed by the wizard, you should keep the already existing printer driver. Otherwise you must specify a new printer driver later.
Name the printer.
Select printer sharing, specify a printer share name and specify additional printer information if desired.
After finishing the installation the new printer appears in the “Devices and Printers” window (Fig. 15.4).
Find a description in the “Print to a HELIOS print queue from a Windows network client” chapter in the PCShare manual.
If installed, the Windows LPD Service 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 LPD Service is turned off.