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.

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.

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.