![]() |
![]() |
![]() |
![]() |
![]() |
HELIOS Base UB+ User manual |
15 Advanced printing system
HELIOS developed an entirely new 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 job name titles
- Administration of the HELIOS print server is done remotely via HELIOS Admin from any Mac, Windows or UNIX machine:
- 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".
15.1 The HELIOS printing system
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" 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. 98) which are defined in a group of printers.
Fig. 98: Example "Clone queue"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. 99).
Fig. 99: Example "Balance queue"* next available queue in "Balance" group.
Note: 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.15.2 Printer output interfaces
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.
15.3 HELIOS LPR
Name
lpr - send a job to the printer
Synopsis
Description
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.
Options (= not used by HELIOS LPR printing)
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.
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.
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.
15.4 LPRM
Name
lprm - remove jobs from the printer queue
Synopsis
HELIOSDIR/bin/lprm [-Pprinter] [-] [user] [job...]Description
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 -Phosthost is ready and printingRank Owner Job Files Total Size
active wendy 385 standard input 35501 bytes
example% lprm -Phost 385lprm 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.
Options
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).
Limitations
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.
15.5 LPQ
Name
lpq - display the queue of printer jobs
Synopsis
HELIOSDIR/bin/lpq [-Pprinter] [-l] [+[n]] [user...]
[job...]Description
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.
Note: Print job names are displayed in UTF-8 encoding. The HELIOS "uniconv" tool can be used to convert the output into other encodings, e.g. ISO-8859-1.Options
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.
15.6 LPC
Name
lpc - line printer control program
Synopsis
Description
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.
Usage
Commands may be abbreviated to an unambiguous substring.
Note: 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).? [command]...
help [command]...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.
moveJob printer1 printer2 [jobid]
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.
copyJob printer1 printer2 [jobid]
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.
Remove all files with names beginning with cf, tf, ef, vf, or df 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.
down all | printer ... [message]
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).
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.
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 be run by any user.
shiftJob printer jobid [predecessorid]
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.
Enable printing and start a spooling daemon for the listed printers. The start command can only be used by the superuser.
Stop a spooling daemon after the current job completes and disable printing. The stop command can only be used by the superuser.
topq printer [ jobid...][user ...]
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.
Diagnostics
15.7 LPD
Name
Synopsis
Description
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.
The Internet port number used to communicate with other processes is obtained with getservent.
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 a "ipaccess.lpd" file you could do the following:
Copy the existing "ipaccess" file to "ipaccess.lpd".
cd /usr/local/helios/var/confcp ipaccess ipaccess.lpdThen edit "ipaccess.lpd" for your needs.
Options
Log valid requests received from the network. This can be useful for debugging purposes.
Operation
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.
L Literal. This line contains identification information from the password file, and causes a burst page to be printed.
N Filename. The name of the file being printed, or a blank for the standard input (when lpr is invoked in a pipeline).
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 control files contain a symbolic link to the actual file, and no data files are created.
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.
15.8 Printcap
Name
printcap - printer capability database
Synopsis
Description
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 -Pprinter 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:
Boolean 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.
Numeric 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:
String Capabilities that give a sequence which can be used to perform particular printer operations such as cursor motion. 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-charactercapability code followed by an "=" sign and then a string ending at the next following ":", e.g.:
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:Capabilities
If the local line printer driver supports indentation, the daemon must understand how to invoke it.
Example preferences for AppleTalk/PAP printer:
# Spooler Preferences for PAP and SMB:
[][Printers][lw8500][PAPPublish]flags=0type=Booleanvalue=TRUE[][Printers][lw8500][SMBPublish]flags=0type=Booleanvalue=TRUE[][Printers][lw8500][authenticate]flags=0type=Booleanvalue=FALSE[][Printers][lw8500][papname]flags=0type=Stringvalue=[19]p610-lw8500-spooler[][Printers][lw8500][SMBExportName]flags=0type=Stringvalue=[6]lw8500[][Printers][lw8500][SMBExportSpec]flags=0type=Stringvalue=[38]bin/pcfilter lw8500 | bin/lpr -Plw8500# Interface Preferences for AppleTalk PAP:
[][Printers][lw8500][entity]flags=0type=Stringvalue=[44]LaserWriter 8500:LaserWriter@HELIOS Backbone[][Printers][lw8500][IfType]flags=0type=Stringvalue=[5]papif[][Printers][lw8500][holdq]flags=0type=Stringvalue=[12]printpreview[][Printers][lw8500][errorq]flags=0type=Stringvalue=[5]errorExample HELIOS "printcap" entries:
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:Files
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
15.9 Windows printing
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. 100). After all settings have been done, click the OK button.
Fig. 100: TCP/IP Print Server Properties window
© 2008 HELIOS Software GmbH |
![]() |
![]() |
![]() |
![]() |
![]() |