QNX Technical Articles
QNX® Momentics® Development Suite 6.3.0 SP3 or 6.3.2 HP APDK-based phs-to-pcl Filter (Patch ID 836) Release Notes
Date of this edition: March 13, 2008
Target OS: This patch is compatible with targets that are running QNX® Neutrino® 6.3.0 SP3 or 6.3.2.
Host OS: In order to apply this patch, you must have installed QNX Momentics 6.3.0 SP3 or 6.3.2 as a self-hosted QNX® Neutrino® system, or on one of the following host OSs:
| Version of QNX Momentics | Microsoft Windows | Linux | Solaris |
|---|---|---|---|
| 6.3.0 SP3 | Windows Vista, XP SP2, 2000 SP4, or NT SP6a | Linux Red Hat 8 or 9, Red Hat Enterprise WS 3 or 4, Red Hat Fedora Core 3 or 4, Debian 3.1, or SUSE 10 | Sun Solaris 7, 8, 9, or 10 |
| 6.3.2 | Windows Vista, XP SP2, or 2000 SP4 | Linux Red Hat Enterprise Workstation 4 or 5, Red Hat Fedora Core 6 or 7, Ubuntu 6.0.6 LTS or 7.0.4, or SUSE 10 | Not supported. |
![]() |
For the most up-to-date version of these notes, go to our website (www.qnx.com), log into your myQNX account, and then go to the Download area. |
Contents
Throughout this document, you may see reference numbers associated with particular issues, changes, etc. When corresponding with our Technical Support staff about a given issue, please quote the relevant reference number. You might also find the reference numbers useful for tracking issues as they become fixed.
What's in this patch?
This patch contains a new HP APDK-based phs-to-pcl filter, plus configuration files for the supported printers. The following files are installed in the target-specific directories under $QNX_TARGET/:
- ARMBE:
- armbe/usr/sbin/spooler
- ARMLE:
- armle/usr/bin/phs-to-pcl
- armle/usr/lib/libphauxrender.so
- armle/usr/lib/libphauxrender.so.1
- armle/usr/sbin/spooler
- MIPSBE:
- mipsbe/usr/sbin/spooler
- MIPSLE:
- mipsle/usr/bin/phs-to-pcl
- mipsle/usr/lib/libphauxrender.so
- mipsle/usr/lib/libphauxrender.so.1
- mipsle/usr/sbin/spooler
- PPCBE:
- ppcbe/usr/bin/phs-to-pcl
- ppcbe/usr/lib/libphauxrender.so
- ppcbe/usr/lib/libphauxrender.so.1
- ppcbe/usr/sbin/spooler
- SHLE:
- shle/usr/bin/phs-to-pcl
- shle/usr/lib/libphauxrender.so
- shle/usr/lib/libphauxrender.so.1
- shle/usr/sbin/spooler
- x86:
- x86/usr/bin/phs-to-pcl
- x86/usr/lib/libphauxrender.so
- x86/usr/lib/libphauxrender.so.1
- x86/usr/sbin/spooler
The following files are installed under $QNX_TARGET/etc/printers, and also in /etc/printers on self-hosted QNX Neutrino systems:
- pcl.cfg
- acl.cfg
Fixed issues
This patch contains a new phs-to-pcl filter that's based on HP's Appliance Printing Development Kit (APDK), a library that generates PCL output for a wide range of HP printers. (Ref# 52331, 52595)
Syntax:
phs-to-pcl -m model [options] filename > device
Options:
- -A
- 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.
- -d
- Delete the input file after processing.
- -h height
- Specify the initial height of the source image. The default is 480 pixels.
- -L
- Enable landscape mode.
- -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.

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.
- -opmode
- Specify the color mode. The choices are 1 (black and white), 3 (color), or 4 (Color).
- -oQn
- Set the print quality (0 is draft, 1 is normal, 2 is high). The default is 1.
- -oq
- Use the QNX dithering method (default).
- -oSX,Y
- Scale the image in the X or Y dimension
(e.g. -oS0.75,0.6). The scale value may be:
- Negative
- 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).
- Positive
- 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.
- 0
- 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 1/4 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.
- -pr
- 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.
- -V
- 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).
- filename
- The name of a Photon draw-stream (*.phs) file.
Description:
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:
- Deskjet 350C
- Deskjet 400, 400L
- Deskjet 450, 460 Series
- Deskjet 500 Series, 520, 540
- Deskjet 6XX series
- Deskjet 810C, 812C, 815C, 816C, 830, 832, 840, 841, 842, 843
- Deskjet 825, 845
- Deskjet 850, 855, 870, 880, 882, 890, 895
- Deskjet 9XX Series
- Deskjet 11XX Series, 12XX Series
- Deskjet 3810, 3816, 3818, 3819, 3820 Series, 3822, 3870
- Deskjet 51XX, 55XX, 56XX, 57XX, 58XX, 59XX
- Deskjet 61XX, 65XX, 66XX, 68XX, 69XX
- Deskjet 5600 & 5100 & 5800
- Deskjet 6540 & 6520
- Deskjet 5740
- Deskjet 6840
- Deskjet 3320 & 3420 & 3325
- Deskjet 3600 & 3500
- Deskjet 3740 & 3840
- Deskjet 9300
- Deskjet 96XX
- Deskjet 98XX
- Officejet 3XX, 5XX, 6XX, 7XX
- Officejet 11XX
- Officejet 51XX, 61XX, 62XX, 63XX, 4100, 4105, 4200, 5500, 9100
- Officejet 71XX, 72XX, 73XX, 74XX
- Officejet 9x11
- Officejet d Series
- Officejet G Series
- Officejet J Series
- Officejet K Series
- Officejet Lx
- Officejet R Series
- Officejet t Series
- Officejet v Series
- Officejet Pro K Series
- Officejet Pro L Series
- PSC 500, 7XX, 9XX
- PSC 15XX, 16XX
- PSC 21XX, 22XX, 23XX, 24XX, 25XX
- PhotoSmart 1XX, 2XX, 3XX, 4XX
- PhotoSmart 11XX, 12XX, 13XX
- PhotoSmart 25XX, 26XX, 27XX
- PhotoSmart 31XX, 32XX, 33XX
- PhotoSmart 71XX, 72XX, 73XX, 74XX, 75XX, 76XX, 77XX, 78XX, 79XX
- PhotoSmart 80XX, 81XX, 82XX, 84XX, 87XX
- PhotoSmart A3XX, A4XX, A5XX, A6XX, A7XX
- PhotoSmart C31XX, C41XX, C51XX, C61XX, C71XX
- PhotoSmart D51XX, D61XX, D71XX, D73XX
- PhotoSmart Pro B83XX
- PhotoSmart P1000, P1100
- All Monochrome Laserjet Printers and MFPs (except LJ 1000, 1005, 1018, 1020)
- All Color LaserJet Printers and MFPs (except LJ 1600, 2600, 3500, 3550, 3600)
- Apollo P2100 & P2150
- Apollo P2200 & P2250
- E-Printer e20
- Business InkJet 1000, 1100 Series, 1200 Series, 22XX Series, 2300 Series, 2600 Series, 2800 Series, 3000 Series
- Color Inkjet cp1700 Series
- HP 2000 Series, 2500 Series
- Apollo 2200, 2500, 26XX, P2XXX
To see if your printer is supported, you can:
- Check the list above to see if your printer model is on it.
- Get the PNP model information from your printer by using the enum-par (see the documentation for enum-devices) or usb command, and checking it against the substring list output by phs-to-pcl's -mlist_supported option. If a string in this list is a substring of your printer's PNP model, then the printer is supported. If there is no substring match, phs-to-pcl filter aborts when that model name is used.
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.
Examples:
phs-to-pcl -mDeskjet_6940_series file.phs > /dev/usbpar0
Differences between old phs-to-pcl and the new APDK-based version
- The -m model command-line option is now mandatory when you invoke phs-to-pcl.
- The following command-line options are no longer applicable and are
silently ignored:
- -orn
- Set the resolution.
- -oq
- Use the default dithering method.
- -oh
- Use halftone dithering.
- -of
- Use Floyd-Steinberg dithering.
- -odn
- Printer graphical depletion.
- -osn
- Printer shingling.
- -oin
- Adjust the intensity.
- -ocn
- Adjust cyan/monochrome.
- -omn
- Adjust magenta.
- -oyn
- Adjust yellow.
- -C
- Disable the compression of output data.
- -M model
- Select the printer model by using a QNX model (a hexadecimal integer). Don't confuse this option with the -m option.
Known issues
We haven't tested all of these printers, so there may be some on the list that don't work as expected. Whenever possible, we'll update these notes with a list of printers that have known issues:
- HP LaserJet 1022
- The HP APDK doesn't explicitly mention support for this and some other Laserjet printers, although it does have general support for monochrome LaserJets. We've noted occasional problems with this printer, such as printing at huge resolutions, garbage characters getting printed on one or more pages, and no printing at all on one or more pages.
Using USB printers
In order to use a USB printer, start the USB stack, and then start devu-prn. For example:
io-usb -dohci waitfor /dev/io-usb/io-usb devu-prn
Once you've done this, you can use either the lpr family or spooler; for general instructions, see the Printing chapter of the Neutrino User's Guide.
Setting up /etc/printcap
Whether you use lpr or spooler, you need to set up an entry in /etc/printcap for your printer. For example:
hpps: \ :lp=/dev/usbpar0 :sd=/usr/spool/output/hpps
This entry gives the name hpps to the USB printer, identifies the file to open as /dev/usbpar0 (or whatever device devu-prn created), and identifies the spooling directory as /usr/spool/output/hpps.
![]() |
Be sure to create the spooling directory if it doesn't already exist. |
Printing with lpr
To access this printer, specify lpr -Pprinter_name or set the PRINTER environment variable to printer_name, where printer_name is the name you gave to the printer in /etc/printcap (hpps in the example above).
Printing with spooler
If you want to print from Photon applications on your USB printer, you need to start an instance of spooler to manage it (for example in /etc/rc.d/rc.local).
![]() |
QNX Neutrino doesn't currently enumerate USB printers. |
To set up your USB printer, do the following:
- Create /usr/spool/output/device, where device is the device that devu-prn created for the printer (e.g. usbpar0).
- Start spooler, specifying the printer's device.
For example:
spooler -d /dev/usbpar0
Your printer should now appear in /dev/printers.
Technical support
If you have any questions, comments, or problems with a QNX product, please contact Technical Support. For more information, see the How to Get Help chapter of the Welcome to QNX Momentics guide or visit our website, www.qnx.com.