Setting up printing
This file documents the procedure to set up printing with the HP OfficeJet
Linux driver (hpoj) package.
Due to the wide variety of printing solutions (spoolers, print drivers,
setup tools, etc.) available for Unix-like operating systems, this
document cannot possibly provide information specific to each one.
Instead, it presents the general procedure for setting up printing and
emphasizes what you need to do differently (compared to the "traditional"
case of a single-function printer) so that printing co-exists properly
with other hpoj functions such as scanning
or photo-card access. For more specific
instructions, also consult your distribution's printing-setup documentation
and/or the Linux Printing
HOWTO.
Be sure to follow the instructions to compile
and install the hpoj software and set up
basic device connectivity if you haven't already. In particular,
ptal-init must be
set up to start at bootup before
your print spooler, or you may experience problems setting up print queues
here (if using CUPS) or hangs during
subsequent bootups (if using LPRng).
In case of difficulty
If something goes wrong with these instructions, then refer to the separate
printing details and
troubleshooting document for more information.
Setting up a print queue (generic and lpd-specific)
First, you need to add a print queue to your spooler.
Note: This procedure doesn't work for
CUPS. See the next section
for CUPS-specific instructions.
It is recommended to use your distribution's printer-setup utility
(printtool, PrinterDrake, YAST2, etc.) if possible. Again,
for details consult your distribution's printing-setup documentation
and/or the Linux Printing
HOWTO.
Local (parallel or USB) queues:
You need to specify the path and filename where the print-job data
should be written. For hpoj-managed devices, you must print through
ptal-printd, which sets up a
special "pipe" file for you to print to, which you should specify here.
Normally ptal-printd pipe files
are located in the directory /var/run/ptal-printd, and the
filename is based on the PTAL device name
but with colon characters changed to underscores. You can either look in
/var/run/ptal-printd to determine the correct filename to which
to print, or inspect ptal-printd's
startup syslog message (probably in /var/log/messages).
For example, the PTAL device name
mlc:par:OfficeJet_T_Series maps to
/var/run/ptal-printd/mlc_par_OfficeJet_T_Series,
and mlc:usb:OfficeJet_G85 maps to
/var/run/ptal-printd/mlc_usb_OfficeJet_G85.
Important: Do not specify "traditional" character devices such
as /dev/lp0 or /dev/usb/lp0, because these conflict with
ptal-mlcd's requirement of exclusive
direct access to the device.
Remote (JetDirect) queues:
Set up a remote lpd queue using the hostname or IP address of
the JetDirect and raw as the remote queue name. For multi-port
JetDirects such as the 500X, specify the remote queue name as raw1,
raw2, or raw3 to select which port to print to.
After creating the print queue(s), you may need to restart your print
spooler (such as lpd) to cause it to re-read its configuration
file(s) and notice the new queue(s).
Setting up a print queue
(CUPS-specific)
Newer versions of CUPS (Common UNIX
Printing System) do not print to arbitrary "file" destinations.
Therefore, the generic
ptal-printd-based setup procedure
described above will not work with CUPS.
Mark Horn contributed a CUPS ptal
backend driver which enables CUPS to
discover and print to hpoj-managed devices.
First of all, you must restart CUPS
after configuring devices with
"ptal-init setup" so
CUPS will notice the new device(s) and
allow print queue creation.
Next, enter the CUPS administration web
interface and set up the print queue(s). User reports indicate that
other utilities such as kups or YAST2 do not properly handle
devices managed by the CUPS ptal
backend.
Important: Be sure to use the CUPS
ptal backend for setting up hpoj-managed devices. The
"traditional" parallel, usb, and file backends
will likely not work.
Setting up a print driver
Either as part of or after creating the print queue, you must set up an
appropriate print driver for the device. Again, the specific procedure
and list of possible drivers depends on which version of which distribution
you're using.
See the supported-devices page for
hpoj or
hpijs or the
Linux
Printing database for HP printers for the most up-to-date list of
recommended print drivers for each model.
- For PostScript-capable models, no special PostScript-to-other-language
translation is needed, and you will get the best print quality possible
from the device, as long as the application from which you're printing
generates proper PostScript output.
- For non-PostScript models, the
hpijs driver
generally gives the best print quality of all the possible
ghostscript drivers. Therefore, you should select it if it's
an option with your distribution for this or a compatible model. In
some cases, an hpijs
device-class driver such as DJ9xx may be listed instead of
hpijs.
At the time of this writing, the latest
hpijs version 1.2
supports printing on all currently-available PCL-capable HP multi-function
peripherals, including inkjet and laser models. Also, this is the first
hpijs version with
native support for OfficeJet model names without having to know which
OfficeJet model is compatible with which DeskJet model.
- If hpijs is
not immediately an option, then for now you should select an appropriate
lowest-common-denominator standard ghostscript driver:
cdj550 (DeskJet 550) for inkjets, ljet4 (LaserJet 4/5/6)
for LaserJets. Later once you know the print queue is otherwise working
properly you can go back and attempt to switch it to
hpijs.
Trying it out
Once you have fully set up the print queue, try printing a test page.
Some print-setup utilities have a menu option for this, but otherwise
you can try printing from some other application, such as a web browser.
Also, ghostscript supplies some PostScript test pages, possibly
in a directory such as /usr/share/ghostscript/6.51/examples.
Depending on your spooler, you may be able to print PostScript or text
files using a command such as "lpr foo.ps". If you want
to print to a specific queue such as g85duplex, for example, you
can use a command such as "lpr -Pg85duplex foo.ps".
In case of difficulty
If something goes wrong with these instructions, then refer to the separate
printing details and
troubleshooting document for more information.
Next steps
You may now set up scanning and/or
photo-card access (depending on your model)
if you haven't already, or return to the index.