Caution: This version of this document is no longer maintained. For the latest documentation, see


Convert .phs output for a Hewlett-Packard PCL compatible printer


phs-to-pcl -m model [options] filename > device

Runs on:



Force the anti-aliasing of fonts.
-B size
Specify the size of the printer buffer, in bytes. This buffer is used if the specified input file is a FIFO.
-b size
Specify the size of the printer buffer, in bytes.
-c colors
The number of colors available; a value of 1 indicates 256 colors, and a value of 3 indicates 16 million colors.
-D debug_fname
Send debug information to the specified file.
Delete the input file after processing.
-h height
Specify the initial height of the source image. The default is 480 pixels.
-m model
Select the model by specifying the HP model ID string. Underscores in model are converted to spaces, and the ID isn't case-sensitive.

Note: If you specify an unsupported printer model, the filter doesn't produce any output. Use a model of list_supported to get a list of the substrings of all supported printers.

-n name
Specify the name of the printer.
Specify the color mode. The choices are 1 (black and white), 3 (color), or 4 (Color).
Set the print quality (0 is draft, 1 is normal, 2 is high). The default is 1.
Use the QNX dithering method (default).
Scale the image in the X or Y dimension (e.g. -oS0.75,0.6). The scale value may be:
Scale as a multiple of the source image size. For example, use -oS-1,-1 to print the image at exactly its source size. Each pixel of the image will correspond to one printed dot on the page. The size of the printed image will vary depending on the printer resolution (DPI).
Scale as a multiple of the page size. For example, use -oS1,1 to print the image at the full page size. In this example, the image will be distorted if its aspect ratio (X:Y) is different from the page's width:height ratio.
Use the maximum size while respecting the aspect ratio of the source image. For example, -oS0,0.5 scales the image to half the height of the page and scales the width of the image proportionately.

If you set only the X scale factor, the Y scale factor is assumed to be the same value. For example, -oS0.5 sets both X and Y to 0.5, meaning the image will fill ¼ of the page.

-P file
The name of the Photon palette file to use. The default is default.pal.
-p start[,end]
Specify the starting (and optionally ending) page number to print. If start is greater than end, the pages are printed in reverse order.
Print the entire file in reverse order.
-s level
Specify the reporting level, where level is an integer.
-U filename
Delete this file when the print job is completed.
Be verbose (-VV: be more verbose).
-w width
Specify the initial width of the source image. The default is 640 pixels.
-x offset
The initial x offset (default: 0).
-y offset
The initial y offset (default: 0).
The name of a Photon draw-stream (*.phs) file.


This utility converts Photon draw-stream (.phs) output into a form that Hewlett-Packard PCL-compatible printers can understand. The configuration for HP PCL printers, /etc/printers/pcl.cfg, specifies phs-to-pcl as a filter for spooler to use.

The phs-to-pcl filter is based on HP's Appliance Printing Development Kit (APDK), a library that generates PCL output for a wide range of HP printers. To produce the correct output, it must be given the printer model, which for best results should be extracted from the model field of the printer's PnP string. The spooler utility does this automatically if you start it without specifying a configuration file ( with the -c option). For example:

spooler -d /dev/usbpar0

This is the case when spooler is started by an enumerator. To get a list of all valid printer model substrings, pass a model name of list_supported and a valid .phs file. For example:

phs-to-pcl -m list_supported file.phs > /dev/null

This displays a list of printer model substrings accepted by the APDK. For example, if DESKJET 85 is in the list, then a printer that identifies itself as DESKJET 850 will be accepted. Note that some printers may not identify themselves as exactly the same model they're labelled with. For example, the HP Deskjet 5650 isn't in the substring list, but it actually identifies itself as a Deskjet 5600, which is.

According to the HP APDK documentation, the following printer models and/or families are supported:

To see if your printer is supported, you can:

If phs-to-pcl rejects an HP printer model, you might be able to make it work by specifying a different printer model when you invoke phs-to-pcl; if you try different printer models, you may well get perfectly good results.

The output from phs-to-pcl is sent to stdout. You typically redirect this to a printer device, as shown in the example. Error messages are sent to the system logger (viewable using sloginfo), and may also be written to stderr.


phs-to-pcl -mDeskjet_6940_series file.phs > /dev/usbpar0

See also:

phs-to-bjc, phs-to-bmp, phs-to-escp2, phs-to-ijs, phs-to-ps, spooler

Printing with spooler in the Printing chapter of the Neutrino User's Guide