PTAL-PRINTD(8) TTF2PT1 Font Converter PTAL-PRINTD(8)
hpoj reference: "ptal-printd"
ptal-printd devname [options...]
The "ptal-printd" daemon creates a special file (specifically, a named
pipe), which simulates a traditional unidirectional printer character
device. Any data written to this pipe special file, presumably by the
print spooler, is correctly routed through "libptal", "ptal-mlcd", and
on to the printer. Using "ptal-printd" makes it easy to set up a print
queue in conjunction with the hpoj software, because given a particular
print spooler, almost exactly the same procedure is used to set up
printing with an hpoj-driven multi-function peripheral as would be used
to set up printing with a single-function printer. The only difference
is where the print job data goes; instead of printing to something like
"/dev/lp0" or "/dev/usb/lp0", the print queue is configured to print to
something like "/var/run/ptal-printd/mlc_par_OfficeJet_Series_700" or
"/var/run/ptal-printd/mlc_usb_OfficeJet_G85". Important: If you're
using CUPS (Common UNIX Printing System) as your print spooler, then
"ptal-printd" likely will not work for you, because for security rea-
sons newer versions of CUPS refuse to print to arbitrary file loca-
tions. The hpoj software now includes a CUPS "ptal" backend
("ptal-cups") which you should use instead of "ptal-printd". Click
here for more information on setting up printing with the hpoj soft-
ware. Syntax The "ptal-printd" command-line syntax is as follows:
o "devname" is the PTAL device name (required)
o "-like /dev/lp0" -- Copies the pipe's permissions (mode, owner, and
group) from the "/dev/lp0" device node. It's probably OK to spec-
ify "/dev/lp0" regardless of how your device is connected, as long
as the specified device node is actually present on your system.
However, this is not necessarily the case anymore with the advent
of "devfs" on some distributions, so "ptal-init" now caches these
permissions in a separate file ("/etc/ptal/ptal-printd-like") and
passes it to ""ptal-printd -like"".
o "-morepipes n" -- Creates n additional pipes (for example, 9) for
this device, in case you want to set up multiple print queues.
Other possible options (not necessary in most cases):
o "-pipename filename" -- Sets name of pipe. The default is based on
the PTAL device name, with colon characters mapped to underscores.
o "-pipepath path" -- Sets path of pipe if name doesn't contain a
path (i.e. no slashes). The default path is
o "-colon character" -- Sets character to replace colon when using
default pipename, since colons have a special meaning in
"/etc/printcap". The default is the underscore character.
o "-mode 0octal" -- Sets pipe permissions (use leading 0 for octal).
The default is 0622 (user read/write, group/other write-only).
Since it is set explicitly in the code, the "umask" setting doesn't
o "-owner uid" -- Sets pipe owner (numeric user ID only). The
default is the current effective UID.
o "-group gid" -- Sets pipe group (numeric group ID only). The
default is the current effective GID.
o "-nofork" -- Runs in the foreground instead of the default as a
o "-retrydelay seconds" -- Sets retry delay if PTAL print-channel
open fails. The default is 30 seconds.
o "-timeout seconds" -- Sets idle timeout, where the PTAL print chan-
nel is closed if no data or end-of-file is received. The default
is no timeout.
o "-uel", "-nouel" -- Enables/disables wrapping jobs with
UEL/end-of-job escape sequences. The default is disabled.
Previous versions of "ptal-printd" used "/dev/ptal-printd" as the
default "-pipepath". That has now been changed to
"/var/run/ptal-printd", because some platforms have a read-only "/dev"
file system. For the sake of backwards compatibility, "ptal-init"
attempts to create a symlink from "/dev/ptal-printd" to
"/var/run/ptal-printd" so you don't have to recreate your print queues
when upgrading from a previous hpoj version. If you're setting up mul-
tiple print queues to the same device, then you should ensure that the
""-morepipes n"" option is passed to "ptal-printd". This option causes
the specified number of additional pipes (for example, 9) to be created
with the same base name as the "main" pipe but with two underscores (or
the character specified by "-colon") and a 1-based index appended, for
"/var/run/ptal-printd/mlc_usb_PSC_750__2", etc. Simply set each print
queue to send its data to a different one of these pipes to ensure that
print data from multiple queues doesn't get interleaved (with quite
undesirable results). Don't confuse the "ptal-printd" daemon (with a
trailing ""d"") and the "ptal-print" command-line utility (without a
trailing ""d""), which is an alias for "ptal-connect". "ptal-printd"
logs startup and error messages to syslog ("/var/log/messages") in
addition to logging to standard error. If you specify the "-uel"
switch, a UEL (Universal Escape Language) sequence ("Esc%-12345X") is
sent before a print job, and a PCL end-of-job sequence ("EscE") and
another UEL are sent after a print job, to help identify job boundaries
for the printer. However, this may not happen in the case of back-to-
back print jobs, because "ptal-printd" may not get an end-of-file indi-
cation when reading from the pipe if data from the next job is already
in the pipe by the time it reads the last data from the previous job.
"-nouel" is now the default behavior, because normally print drivers
automatically add these kinds of escape sequences if necessary, the
printer already gets job boundaries based on when the print channel is
closed and reopened between jobs, and it may cause problems when print-
ing to devices that don't support PCL. If during a print job an error
occurs with communicating with the device, the rest of the print job
data is discarded, subject to the limitations discussed above regarding
"ptal-printd"'s ability to detect boundaries of back-to-back jobs.
Subsequent jobs are retried indefinitely if it's not possible to re-
open the print channel to the device.
current March 13, 2005 PTAL-PRINTD(8)