Printing Solution Resources for the Solaris Operating Environment Integrating Print Functionality, Basic Principles and More
Software engineer Eric Reid provides tips for integrating
printing into SolarisTM Operating Environment (Solaris OE)
applications. While there are no application
programming interfaces (APIs) specifically for printing in Solaris OE,
there are three printing-related call-level interfaces (CLIs).
Understanding the functions of these CLIs, along with some basic rules,
will help developers quickly integrate printing functionality such as
querying for available printers and submitting jobs for output.
To implement printing, developers need to become familiar with the
three call-level interfaces: lpstat(1), lp(1) and cancel(1). Their
complete definition can be found in the System V Interface Definition
(SVID) or in the Solaris OE online man pages.
Did You Know:
To generate a list of available printers programmatically, use the
public interface to lpstat(1) to obtain a listing of all printer
status. You can then parse the output for the name of the printers. The
public interface to lpstat(2) would be executed using popen(3S).
To submit a job programmatically, use the public interface to lp(1).
To integrate support for new printers, first read the Solaris OE
Administrator's Guide.
Do not assume that because the client side of Solaris OE printing behaves
like a BSD-style system, the server side will also. Actually, Solaris OE
2.6 does not contain a BSD-style print system. Instead, it contains a
UNIXR system V-style lp server with software to take requests through
the lpd protocol. The server is very much like System V internally and
in much of its external interfaces.
A print utility application wishing to have greater control over lp may
be inclined to rename /usr/bin/lp and have some lp_wrapper script call
it under certain conditions. This is very dangerous and is discouraged
by Sun. For more from Reid, see:
Alice Soteriou has written about basic principles of printing in the
Solaris OE 2.6 and above. Solaris 2.6 delivered a re-engineered print
subsystem that improved and changed the product. These changes have
resulted in much confusion as to what is supported and what is not.
There's also uncertainty in figuring out the best way to create and
maintain a reliable print server. Customers use a variety of methods to
maintain their print servers, with which they may be very satisfied.
However, if these methods are not supported by Sun, it can be very
difficult to diagnose and fix issues.
Soteriou provides a simple guide on how to create and administer print
servers and clients. The troubleshooting section will help you locate
exactly where your printing problem occurs and how to go about fixing
it. Soteriou offers basic definitions for clarity.
Definitions in the list include print server or spooler, print client and
local and remote printing. Soteriou discusses common myths such as port
monitors being required to print. She also covers creating and managing
a print server, using third party software to create queues, configuring
print clients and more. For additional details, see:
Customized news reports about Sun Microsystems. Just the news you need, none of what you don't. 50,000+ Members. 20,000+ Articles Published since 1998.