Problem
LP print forms have been added to the system (using lpforms) and are stored in /var/spool/lp/admins/lp/forms (a separate subdirectory for each form).
However, the print subsystem does not recognize the print forms, even after being restarted with "/usr/lib/lpshut; /usr/lib/lpsched". The command "lpstat -f all" should list all the print forms available to the lp print service, but this returns nothing.
Cause
A possible cause of this is a corrupt or invalid forms definition file in the directory:
/var/spool/lp/admins/lp/forms/<form_name>If the lp subsystem on starting encounters a corrupt or invalid form definition file, it can stop reading in the forms definitions. It will not fail to start (so printing services will be available), but it will not have recognized the forms definitions.
Solution
Check through the forms definitions in the directory:
/var/spool/lp/admins/lp/forms/<form_name>Each form should have a subdirectory (named after the form name),
which in turn contains a "deny" file and a "describe" file by
default (the "deny" file is optional and may be used in conjunction
with an allow file). The "describe" file format is important, if it
includes any blank lines in the file or control characters. This
may cause the lp subsystem to exit reading in the print form
definitions. As an example, here is a working "describe" file for
an lp form:page length: 96 page width: 132 number of pages: 1 line pitch: 8 character pitch: 12 character set choice: any ribbon color: any
The cause of the problem can be quickly identified by moving the suspect form directory elsewhere. For example:
mv /var/spool/lp/admins/lp/forms/bad_form /bad_formThen stop and restart the print scheduler to see whether the forms (except the bad one) are now recognized:
/usr/lib/lpshut; /usr/lib/lpsched
lpstat -f allWhile this file can be manually edited, care should be taken and
it may be advisable to use the lpforms command to resubmit a forms
definition which will recreate this file automatically. See
man lpforms(ADM) for more details.If you have a large number of forms defined on the system, the utility "scotruss" may be of help to identify which form definition is read just prior to the lp subsystem exiting the reading in of the forms (and so the corrupt one).
You can obtain "scotruss" for earlier versions from SCO Support.
However, this utility is not supported by SCO.
"truss" comes included now with SCO OpenServer 5.0.7In this case, it is the lpstat process which needs to be traced:
scotruss -o /tmp/lpstat.truss lpstat -f allNow examine the /tmp/lpstat.truss output file to see what the last form definition read before exiting was.
See also
SCO OpenServer System Administration Guide - Chapter 4 "Managing Printers and Print Jobs"
lpforms(ADM); lpstat(C)