Bull AIX 5L Guide to Printers and Printing AIX ORDER REFERENCE 86 A2 58EM 00
Bull AIX 5L Guide to Printers and Printing AIX Software July 2004 BULL CEDOC 357 AVENUE PATTON B.P.
The following copyright notice protects this book under the Copyright laws of the United States of America and other countries which prohibit such actions as, but not limited to, copying, distributing, modifying, and making derivative works. Copyright Bull S.A. 1992, 2004 Printed in France Suggestions and criticisms concerning the form, content, and presentation of this book are invited. A form is provided at the end of this book for this purpose.
About This Book This book provides users and system administrators with complete information about how to perform such tasks as printing files, managing the progress of print requests, and configuring printers. For more advanced users and programmers, this book contains information on print spooling and topics such as the printer backend. This publication is also available on the ”Hypertext Library for AIX 5.3” CD-ROM that is shipped with the operating system.
iv Guide to Printers and Printing
Contents About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Highlighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Case–Sensitivity in AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ISO 9000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 2. Printing Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Printing processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Controlling the printing process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initial printer configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Verifying terminal output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the physical printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring a virtual printer and print queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring a queue for modem connections . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring a printer for an ASCII display terminal . . . . . . . . . . . . . . .
viii Web–based System Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Listing all supported and defined printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . To list all supported printers: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . To list all defined printers: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moving printers to another port . . . . . . . . . . . . .
/etc/qconfig Spooler Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . /etc/qconfig File Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Spooler Queues, Virtual Printers, and Physical Printers . . . . . . . . . . . . . . . . . . . . . Spooler Queue Names and Status Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16 3-16 3-17 3-18 Chapter 4.
Printer Attachment Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42 Using the SMIT Interface for Printer Attachment Files . . . . . . . . . . . . . . . . . . . . . . 4-42 Attachment File Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42 Structure of Attachment Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-43 Attachment File Field Definitions . . . . . .
Lexmark Optra E310 Laser Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lexmark Optra M410 Laser Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lexmark Optra Se Laser Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lexmark Optra T Laser Printer Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lexmark Optra W810 Laser Printer . . . . . . . . . . . . . . . . . . .
Chapter 6. System V Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understanding the Print Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Print Request Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Print Request Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Request Log Entries . . . . . . . . . . . . . . . . . . .
Installing and Maintaining PostScript Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Obtaining a List of Printer–Resident Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Printer–Resident Fonts to a Printer’s Font List . . . . . . . . . . . . . . . . . . . Installing and Maintaining Host–Resident Fonts . . . . . . . . . . . . . . . . . . . . . . . . . Downloading Host–Resident Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiv Guide to Printers and Printing
Chapter 1. Printing Overview Printing in AIX offers a myriad of configuration and setup options. Depending on the printer, you can control the appearance and characteristics of the final output. The printers need not be located in the same area as the system unit and the system console. A printer can be attached directly to a local system, or a print job can be sent over a network to a remote system.
Printing terminology The following list defines terms commonly used with printing. formatter filter Provides the capability of either formatting the input print file or passing it through unmodified, based on an input parameter. Even if the filter passes the input file unmodified, it still sends printer commands to initialize the printer before the input file is printed and restores the printer after printing is complete.
some instances, you might have to submit print jobs one file at a time or concatenate files before submitting them as a print job. The primary spooler command is the enq command. Although you can invoke this command directly to queue a print job, three front–end commands are defined for submitting a print job: the lp, lpr, and qprt commands.
for the formatter filter. The formatter filter processes the header page and writes the result to standard output. Standard output for the formatter filter becomes standard input for the device driver interface program that writes the filtered header page to the printer device driver. printer/plotter device A special file in the /dev directory for the device. This file can be used by redirection (for example, cat FileName> /dev/lp0 ).
real printer The printer hardware attached to a serial or parallel port at a unique hardware device address. The printer device driver in the kernel communicates with the printer hardware and provides an interface between the printer hardware and a virtual printer. A real printer can be added with the Web–based System Manager (type wsm, and then select Printers ) or with the mkdev command at the command line. remote printer A printer that is not directly attached to a local system.
Starting a print job (qprt command) Use the qprt or smit command to request a print job and specify the following: • Name of the file to print • Print queue name • Number of copies to print • Whether to make a copy of the file on the remote host • Whether to erase the file after printing • Whether to send notification of the job status • Whether to send notification of the job status by the system mail • Burst status • User name for ”Delivery To” label • Console acknowledgment message for remote print • Fil
–b Number Specifies the bottom margin. The bottom margin is the number of blank lines to be left at the bottom of each page. –B Value Specifies whether burst pages (continuous–form pages separated at perforations) should be printed. The Value variable consists of a two–character string. The first character applies to header pages. The second character applies to trailer pages.
–L Option Specifies whether lines wider than the page width should be wrapped to the next line or truncated at the right margin. + Indicates that long lines should wrap to the next line. ! Indicates that long lines should not wrap but instead should be truncated at the right margin. –N Number Specifies the number of copies to be printed. If this flag is not specified, one copy is printed. –p Number Sets the pitch to Number characters per inch. Typical values for Number are 10 and 12.
–z Value Rotates page printer output the number of quarter–turns clockwise as specified by the Value variable. The length (–l) and width (–w) values are automatically adjusted accordingly. 0 Portrait 1 Landscape right 2 Portrait upside–down 3 Landscape left. –# Value Specifies a special function. j Displays the job number for the specified print job h Queues the print job, but puts it in the HELD state until it is released again. v Validates the specified printer backend flag values.
smit command To start a print job using SMIT, enter: smit qprt 1-10 Guide to Printers and Printing
Canceling a print job (qcan command) This section discusses how to cancel any job in the print queue. When you cancel a print job, you are prompted to provide the name of the print queue where the job resides and the job number to be canceled. This procedure applies to both local and remote print jobs. Prerequisites • For local print jobs, the printer must be physically attached to your system or, in the case of a network printer, attached and configured on the network.
Prioritizing a print job (qpri command) This section discusses how to change the priority of a print job. You can only assign job priority on local queues. Higher values indicate a higher priority for the print job. The default priority is 15. The maximum priority is 20 for most users, and 30 for users with root user privilege and members of the printq group (group 9 ). Note: You cannot assign priority to a remote print job. Prerequisite The printer must be physically attached to your system.
Moving a print job to another print queue (qmov command) This section discusses how you can move a print job to another print queue. Note: You cannot move a remote print job to another print queue. Prerequisite The printer must be physically attached to your system. You must be the print job owner. See Moving a print job between queues on page 2-33 for information about moving print jobs ofother users.
Holding and releasing a print job (qhld command) This section discusses how to hold a print job after it has been sent to the print queue. You can later release the print job for printing with these same commands. Note: You cannot hold and release remote print jobs. Prerequisite The printer must be physically attached to your system. You must be the print job owner. See Holding and releasing print jobs on page 2-32 for information about holding and releasing print jobs of other users.
Checking print job status (qchk command) This section discusses how you can display the current status information for specified job numbers, queues, printers, or users. Prerequisites • For local print jobs, the printer must be physically attached to your system or, in the case of a network printer, attached and configured on the network. • For remote print jobs, your system must be configured to communicate with the remote print server.
Print queue status conditions Some of the status conditions that a print queue can have are: DEV_BUSY Indicates that: • More than one queue is defined to a printer device ( lp0 ) and another queue is currently using the printer device.
Formatting files for printing (pr command) Use the pr command to perform simple formatting of the files you send to be printed. You pipe the output of the pr command to the qprt command to format your text. Some useful pr command flags are: –d Double–spaces the output. –h ”String ” Displays the specified string, enclosed in quotes ( ” ” ), instead of the file name as the page header. The flag and string should be separated by a space.
This command adds page headings to prog.c and sends it to the qprt command. The heading consists of the date the file was last modified, the file name, and the page number. • To specify a title for a file named prog.c, enter: pr –h ”MAIN PROGRAM” prog.c | qprt This prints prog.c with the title MAIN PROGRAM in place of the file name. The modification date and page number are still printed. • To print a file named word.lst in multiple columns, enter: pr –3 word.lst | qprt This prints the word.
Printing ASCII files on a PostScript printer The Text Formatting System includes the enscript filter for converting ASCII print files to PostScript for printing on a PostScript printer. This filter is called by the qprt –da command when submitting a print job to a PostScript print queue. Prerequisites • The printer must be physically attached to your system. • The printer must be configured and defined. • The transcript portion of Text Formatting Services must be installed.
The following is a list of examples of how these qrpt command flags can be used: • To send the ACSII file myfile.ascii to the PostScript printer named Msps1, enter: qprt –da –PMsps1 myfile.ascii • For example, to send the ACSII file myfile.ascii to the PostScript printer named Msps1 and print out in the Helvetica font, enter: qprt –da –PMsps1 –sHelvetica myfile.ascii • To send the ASCII file myfile.
Automating the conversion of ASCII to PostScript Many applications that generate PostScript print files follow the convention of making the first two characters of the PostScript file %!, which identifies the print file as a PostScript print file. To configure the system to detect ASCII print files submitted to a PostScript print queue and automatically convert them to PostScript files before sending them to the PostScript printer, perform these steps: 1. At the prompt, enter: smit chpq 2.
Overriding automatic determination of print file types You might need to override the automatic determination of print file type for PostScript printing in the following situations: • To print a PostScript file named myfile.ps that does not begin with %!, enter the following at the command line: qprt –ds –Pps myfile.ps • To print the source listing of a PostScript file named myfile.ps that begins with %!, enter the following at the command line: qprt –da –Pps myfile.
Command summary for printing cancel Cancels requests to a line printer. lp Sends requests to a line printer. lpq Examines the spool queue. lpr Enqueues print jobs. lprm Removes jobs from the line printer spooling queue. lpstat Displays line printer status information. pr Writes a file to standard output. qcan Cancels a print job. qchk Displays the status of a print queue. qhld Holds or releases a print job. qmov Moves a print job to another print queue.
1-24 Guide to Printers and Printing
Chapter 2. Printing Administration When working with printers, system administrators must manage a spooler, real printers, virtual printers, backends, and queues, which are all parts of the printer subsystem.
To do this, set the print queue data stream to passthru (that is, d=p). For more information, see Printer Colon File Conventions on page 4-21. Include all printer control information that is unique to that file. For example, to underscore the title of a book or print a paragraph in bold type, insert codes that start and stop the printer control information at the correct places. Some application programs, such as word processors, allow you to insert specific printer controls in the file.
Initial printer configuration You can use one process to configure a printer and another process to add a print queue. The task you use depends on how your printer is attached to the system. You can also configure a printer without adding a print queue.
Viewing print queues and associated virtual printers To view a list of print queues and their associated virtual printers, use Web–based System Manager (enter wsm, and then select Printers ), the SMIT List All Print Queues option, or the lsvirprt command. Configuring a local printer and adding a queue Use the following procedure if you want to configure a local printer in addition to spooling print jobs.
Configuring a remote printer and adding a queue Use the following procedure if you want to configure a remote printer in addition to spooling print jobs. Note: If you want to configure a printer without adding a print queue, see Configuring a printer without adding a queue on page 2-7. Prerequisites The remote host must be configured as a print server. Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers.
Configuring a print queue for a file in the /dev directory se the following procedure if you want to configure a print queue for a file in the /dev directory. Prerequisites • Read the documentation for your printer. You may need printer–specific information to connect and configure the printer. • Review the configuration of your system. • You must have root authority. Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers.
Configuring a printer without adding a queue Use the following procedure if you want to add a printer or plotter, but you do not want to spool print jobs. Note: If you also want to add print queues when you configure your printer, see Initial printer configuration on page 2-3. Prerequisites The printer or plotter must be physically attached to your system before configuring the printer port. See Configuring a printer port on page 2-6. smit command 1. At the system prompt, enter: smit pdp 2.
Print queue operations This section describes the following procedures: 2-8 • Adding a print queue device on page 2-9 • Adding plotter support with 5080 on page 2-10 • Creating a plotter setup file on page 2-11 • Adding a local printer to an existing queue on page 2-12 • Adding an ASCII terminal printer to an existing queue on page 2-13 • Adding an HP JetDirect printer to an existing queue on page 2-14 • Adding a file to an existing queue on page 2-15 Guide to Printers and Printing
Adding a print queue device Use the following procedure to add a print queue device. Prerequisites To perform this task, you must have root authority. Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, use the menus to select or enter values for required attributes such as the name of the device, the queue where the device will be attached, and the path name for the printer backend program. 3.
Adding plotter support with 5080 se the following procedure to add plotter support. Prerequisites • The plotter must be physically attached to your system. • The plotter device must have already been added. smit command The 5080 Attachment Adapter plotter backend is accessible with the enq command after you use this procedure to identify the plotters: 1. At the system prompt, enter: smit pq_mklque 2. At the NAME of Queue to Add prompt, enter: plta to define serial port a. 3.
Creating a plotter setup file To send plot files to the plotter, you need a special file containing the instructions for the type of pacing protocol you are using. Instructions for Xon/Xoff Pacing Protocol and Data Transmit Rate (DTR) Pacing Protocol follow: For Xon/Xoff Pacing For DTR Pacing ESC.R: ESC.R: ESC.M2: ESC.M2: ESC.N2: ESC.N2: ESC.P1: ESC.P3: Each line must be entered with no spaces, ESC has the ASCII value 27. The . (period) is part of the command.
Adding a local printer to an existing queue Use the following procedure to add a local printer to an existing queue. Prerequisites To perform this task, you must be one of the following: • User with root authority • A member of the printq group Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, use the menus to select the local attachment type, manufacturer, and printer model. 3.
Adding an ASCII terminal printer to an existing queue Use the following procedure to add an ASCII terminal printer to an existing queue. Prerequisites To perform this task, you must be one of the following: • User with root authority • A member of the printq group smit command 1. At the system prompt, enter: smit mkpqprt 2. Select the ascii attachment type, manufacturer, printer model, and tty name. 3. Provide additional information as prompted.
Adding an HP JetDirect printer to an existing queue Use the following procedure to add an HP JetDirect printer to an existing queue. Prerequisites To perform this task, you must be one of the following: • User with root authority • A member of the printq group Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, use the menus to select the hpJetDirect attachment type, manufacturer, and printer model. 3.
Adding a file to an existing queue Use the following procedure to add a file to an existing queue. Prerequisites To perform this task, you must be one of the following: • User with root authority • A member of the printq group smit command 1. At the system prompt, enter: smit mkpqprt 2. Select the file attachment type, manufacturer, and model. 3. Enter a file name in the Name of existing FILE in the /dev directory. This is the file where you want print job output to be stored.
Configuring nonsupported printers A nonsupported printer is a device that is not supplied with the operating system.
Wiring nonsupported printers You may need to adapt your nonsupported printer so that it functions properly with the base operating system serial printer device driver: 1. The following chart details what the RS–232 signals mean to the serial printer device driver: RS–232 Signal Serial Printer Device Driver Use FG Frame ground. Often used as shield. TxD ––> Used to transmit data to printer. RxD <–– Used to receive data from printer. RTS <–– Held high after printer port opened.
Printing with terminal–attached printers Many asynchronous ASCII terminals have an auxiliary (AUX) port that can be used to connect a printer. Terminal–attached printing is supported for terminals attached directly to a host machine or attached remotely by modem to a host machine.
– IBM 4208 Model 2 Proprinter XL24E – IBM 4247 Printer – IBM 5204 Quickwriter – IBM 6400 Printer – IBM InfoPrint 40 Printer – IBM Network Color Printer – IBM Network Printer 12 – IBM Network Printer 17 – IBM Network Printer 24 – Hewlett–Packard 2500C Color Printer – Hewlett–Packard LaserJet II – Hewlett–Packard LaserJet III – Hewlett Packard LaserJet IIISi – Hewlett–Packard LaserJet 4 – Hewlett Packard LaserJet 4Si – Hewlett Packard LaserJet 4 Plus – Hewlett Packard LaserJet 4V – Hewlett–Packard LaserJet 50
– Lexmark 2390 Plus Printer (Model 3) – Lexmark 2391 Plus Printer (Model 3) – Lexmark 4039 Plus LaserPrinter – Lexmark 4079 Color JetPrinter Plus – Lexmark 4227 Forms Printer • For more information about certain printers listed above, see the following: IBM InfoPrint 40 Printer on page 4-71 Lexmark Optra E310 Laser Printer on page 4-105 Lexmark Optra M410 Laser Printer on page 4-108 Lexmark Optra Se Laser Printer on page 4-111 Lexmark Optra T Laser Printer Family on page 4-115 Lexmark Optra W810 Laser Print
Installing the physical ASCII terminal To install the physical ASCII terminal: 1. Review all relevant installation planning information and the terminal’s documentation to ensure that you have the components required for installation. 2. Review your system’s configuration, and select the serial port. 3. Ensure that the communications port is not in use. 4. Connect the terminal to the serial communications port. Be sure to use proper cabling. Consult your documentation for cabling instructions. 5.
Configuring a virtual printer and print queue To configure your terminal–attached printer into the print spooling subsystem: 1. At the system prompt, enter: Devices In the Web–based System Manager Devices window, use the menus to complete the steps to configure a virtual printer and print queue. 2. Select the ascii attachment type, manufacturer, and printer model. 3. Provide additional information as prompted.
Configuring a printer for an ASCII display terminal Prerequisites The following prerequisites must be true to configure a printer for an ASCII display terminal: • You must have connected a serial printer to the AUX or PRINT port on your ASCII terminal. See the terminal documentation for cabling instructions. • The tty device for the ASCII terminal must be defined. • The printer must be online. • Verify that the AUX port on the terminal is configured with the same settings as your printer.
Terminal–attached printing limitations Consider the following limitations when configuring terminal–attached printers: 1. Only ASCII data should be sent to the printer. Binary data may inadvertently lock the terminal or cause printing to cease prematurely. 2. Printer status messages, such as out of paper and printer offline, are not supported.
Commands and control sequences This section includes the following topics: • Terminfo database on page 2-25 • Adding support for nonsupported terminals on page 2-25 • Native, 8–port, 16–port, and third–party controllers on page 2-26 • 64–port controller on page 2-26 • 128–port controller on page 2-26 • Printer backend commands on page 2-26 Terminfo database The terminfo database contains the capabilities and special features of a terminal device, such as cursor positioning, initialization sequen
Native, 8–port, 16–port, and third–party controllers Native port (S1 or S2), 8–port, and 16–port controllers do not provide hardware support for terminal–attached printers, and the hardware support for third–party controllers is unknown. As a result, print files must be split into small data blocks. The mc5 control sequence precedes each data block, which is in turn followed by the mc4 control sequence.
Managing print queues and print queue devices This section includes the following topics: • Listing print queues and print queue devices on page 2-28 • Showing status of print queues on page 2-29 • Starting and stopping a print queue on page 2-30 • Setting the default print queue on page 2-31 • Holding and releasing print jobs on page 2-32 • Moving a print job between queues on page 2-33 • Scheduling print jobs on page 2-34 • Changing or showing queue characteristics on page 2-35 • Deleting
Listing print queues and print queue devices The following procedures apply to both local and remote print queues, as well as print queue devices. Prerequisites • The printer devices must be attached to your system for local print queues and print queue devices. • Your system must be configured to communicate with a remote host for remote print queues and print queue devices. To list print queues: 1. At the system prompt, enter wsm, and then select Printers. 2.
Showing status of print queues Use the Web–based System Manager to perform this task. Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printers window, choose the Queue Status icon. From the Selected menu, select Properties, and then select the General tab within the Printer Properties dialog. Information pertaining to status of print queues is displayed in the Print Queue Properties dialog.
Starting and stopping a print queue Prerequisites To perform these tasks, you must have root authority. To start a queue: 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, select the queue or device that you want to start. 3. Select Start all Devices for Queue to start a queue. Select Start a Specific Device to start a device.
Setting the default print queue Prerequisites To perform this task, you must be one of the following: • A user with root authority • A member of the printq group To set the default print queue: 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, select a computer object. 3. Select a queue from the Selected menu. You can also perform this task with the SMIT fast path smit qdefault.
Holding and releasing print jobs Prerequisites To hold or release a print job, you must be one of the following: • Print job owner • A user with root authority • A member of the printq group To hold or release a print job: 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, use the menus to complete the steps to hold a print job or to release a print job currently on hold.
Moving a print job between queues Prerequisites To perform this task, you must be one of the following: • The print job owner • A user with root authority • A member of the printq group Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, select the job you want to move. 3. Select Destination Queue.
Scheduling print jobs Use the SMIT fast path to perform the following tasks. Prerequisites Your root user login name must be included in the /var/adm/cron/at.allow file, or you must have root user authority. To list all scheduled print jobs: At the system prompt, enter: smit lsat This command displays a list of all the print jobs you have scheduled. If you have root user authority, the command lists all currently scheduled print jobs. To schedule print jobs: 1. At the system prompt, enter: smit sjat 2.
Changing or showing queue characteristics Prerequisites The following procedures apply to both local and remote print queues and print queue devices. The following prerequisites must be true to change or display queue properties: • For local print queues, the printer must be physically attached to your system. • For remote print queues, your system must be configured to communicate with the remote print server. • To change queue or queue device characteristics, you must have root authority.
Deleting a print queue The following procedures apply to both local and remote print queues. Prerequisites • For local print queues, the printer must be physically attached to your system. • For remote print queues, your system must be configured to communicate with the remote print server. • To delete a queue or queue device, you must have root authority. To delete a print queue: 1. At the system prompt, enter wsm, and then select Printers. 2.
Other printer administration tasks This section includes the following topics: • Specifying paper size on page 2-38 • Changing or showing printer connection properties on page 2-39 • Changing or showing pre–processing filters on page 2-40 • Listing all supported and defined printers on page 2-41 • Moving printers to another port on page 2-42 • Changing or showing printer properties on page 2-43 • Deleting printers on page 2-44 • Showing status of printer server subsystem on page 2-45 Printin
Specifying paper size Prerequisites The print queue must already be configured. Web–based System Manager To specify the paper size: 1. Load paper in the paper tray. 2. See your printer documentation for information about specifying the paper size, then use the operator panel buttons to enter the paper size. 3. At the system prompt, enter wsm, and then select Printers. 4. In the Web–based System Manager Printers window, double–click on the printer icon. From the Selected menu, select Properties.
Changing or showing printer connection properties Prerequisites To perform this task, you must be one of the following: • A user with root authority • A member of the printq group Web–based System Manager To change or show printer connection properties: 1. At the system prompt, enter wsm, and then select Devices. 2. In the Web–based System Manager Devices window, double–click on a computer object to open its properties. Information is displayed, such as device name, type, interface type, and status.
Changing or showing pre–processing filters This procedure describes how to change or show the command strings that you can run to pre–process print files. A pre–processing filter consists of a command string that you pass to a Korn shell to filter a file before it prints. There are pre–processing filters for each of the values that can be specified with the qprt command –f flag or with the lpr command FilterOption flags.
Listing all supported and defined printers To list all supported printers: At the system prompt, enter wsm, and then select Printers. You can also use the smit lssprt fast path command. Output similar to the following is displayed: bull1021 . . . ibm2380 ibm2380 ibm2380 . . .
Moving printers to another port Prerequisites • The printer must be physically attached to your system. • You must have root authority. • You must have previously defined and configured a printer port. See Configuring a printer without adding a queue on page 2-7. To move a printer to another port: 1. At the system prompt, enter wsm, and then select Devices. 2. In the Web–based System Manager Devices window, select the printer object you want to move. 3. Select Move To... from the Selected menu.
Changing or showing printer properties Prerequisite A printer must have been added. Web–based System Manager 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Devices window, double–click on the printer object. Note: If the printer has a print queue, you can change the printer connection characteristics through the Devices window or the chprtcom commands. You can also perform this task with the SMIT fast path smit chgprt.
Deleting printers This procedure removes a printer from the system. Deleting a printer does not remove any print queues that send print jobs to that printer. See Deleting a print queue on page 2-36 if you want to also delete the print queues. Prerequisites • A printer must have been added. See Configuring a printer without adding a queue on page 2-7. • You must have root authority. Web–based System Manager 1. At the system prompt, enter wsm, and then select Devices. 2.
Showing status of printer server subsystem Use the SMIT fast path to perform this task. smit command 1. At the system prompt, enter: smit server 2. Select Show Status of the Print Server Subsystem.
Printer queuing system status conditions If a printer or device is added as a tty device, the queuing system looks for carrier detect (CD) to recognize the printer. If the device is an LP device, the queuing system uses CTS to detect the printer. Following is a list of print queue status conditions: DEV_BUSY Identifies that: • More than one queue is defined to a printer device ( lp0 ), and another queue is currently using the printer device.
OPR_WAIT Specifies that the backend program is waiting for the operator to perform a task, such as loading paper. This is usually software–related. Normal Recovery: To recover from an OPR_WAIT state, respond appropriately to the request that is made by the queuing system. QUEUED Specifies that a print file is queued and is waiting in line to be printed. READY Specifies that everything involved with the queue is ready to queue and print a job. RUNNING Specifies that a print file is printing.
Remote printing overview Remote printing allows different computers to share printers. To use remote printing facilities, the computers must be connected via the Transmission Control Protocol/Internet Protocol (TCP/IP) and must support the required TCP/IP applications, such as the lpd daemon. A remote print request is queued in the same manner as a local print request: • A front–end print command such as qprt, lpr, or enq initiates the request to the appropriate queue on the local system.
As the preceding example shows, any print jobs currently running or queued are displayed in the remote print server entry for the queue. The rembak program also sends requests to cancel print jobs to the remote print servers. Each print job is assigned a number. As shown in the previous example, print queue status requests display the job numbers for currently queued or running print requests. To cancel a job on a remote queue, use the same commands used to cancel local print jobs.
startsrc Starts a subsystem, group of subsystems, or a subserver. stopsrc Stops a subsystem, group of subsystems, or a subserver. lssrc Gets the status of a subsystem, group of subsystems, or a subserver. refresh Causes the subsystem or group of subsystems to reread the appropriate configuration file. traceson Enables tracing of a subsystem, group of subsystems, or a subserver. tracesoff Disables tracing of a subsystem, group of subsystems, or a subserver.
Managing and using remote printers and queues To print to a remote system, you must set up a remote queue on the local system. This process involves tasks, such as naming a queue and a queue device on the local host, and indicating the name of the remote host and the queue on the remote host to which print jobs are sent.
l_statfilter /usr/lpd/attshort Filter used to translate ATT lpstat command output (short form) when the remote print server is an ATT system. /usr/lpd/aixlong Filter used to translate remote queue status information into a long form for queue status requests such as qchk. This is the default value when the remote print server is another base operating system. /usr/lpd/bsdlong Filter used to translate BSD lpq command output (long form) when the remote print server is a BSD system.
Using remote host access for printing Prerequisites • Your system must be configured to communicate as a remote print server. • The lpd daemon must be installed on your system. • To add a remote host, you must understand naming conventions for TCP/IP. Listing all remote hosts To list all remote hosts: 1. At the system prompt, enter wsm, and then select Printers. 2. In the Printer Queues window, select a computer object. 3.
Deleting a remote host To delete a remote host: 1. At the system prompt, enter wsm, and then select Printers. 2. In the Web–based System Manager Printer Queues window, select the host you want to delete. 3. To complete the steps for deleting a remote host, use the menus or provide additional information as prompted. For detailed information or assistance, see the online help.
Using the lpd remote subsystem Prerequisites • Your system must be configured to communicate with a remote print server. See Using remote host access for printing on page 2-53. • To start or stop the lpd remote subsystem, you must have root authority. Starting the lpd remote subsystem 1. At the system prompt, enter wsm, and then select Printers. 2. In the Printer Queues window, select Overview & Tasks. 3. From the Printer menu, select Start Remote Print Server (lpd).
2-56 Guide to Printers and Printing
Chapter 3. Spooler Overview The job of the spooler, also called the queuing system, is to manage printer use, especially on systems that have more than one printer. When you submit a print job to the spooler, you can continue to use your workstation.
Spooler Introduction Because the backend piobe, used to process print jobs on local queues, is the most commonly used and possibly the most complex backend shipped with the base operating system, it is used as the primary example in this section. Using piobe in this fashion will allow a better development of the base operating system spooler concepts. The purpose of this section is to demonstrate that the spooler is a real process with a beginning, discrete points in between (no black boxes), and an end.
Spooler Concepts The following terms relate to the spooler overview. Formatter Filters A formatter filter is part of the pipeline created and executed by the default backend for local printer queues, piobe. A formatter filter provides the capability of either formatting an input file or passing it through unmodified, based on an input parameter.
Real (Physical) and Virtual Printers A real (physical) printer is the printer hardware attached to the system via a serial or parallel port, or through a network connection such as a network terminal server. When the real printer is attached via a serial or parallel port local to the system, the printer device driver in the kernel communicates with the printer hardware and provides an interface between the printer hardware and a virtual printer.
• For print jobs, provides an environment that you can customize to address specific printing needs. You typically do not run printer backend programs directly, although backends such as compilers can clearly be run directly from the command line. The qdaemon runs the backend, sending it the names of files and any job control flags that you specify. The backend communicates with the qdaemon through a status file in the /var/spool/lpd/stat directory.
Generic Base Operating System Spooler The base operating system spooler is not specifically a print job spooler but a generic spooling system that can be used for queuing various types of jobs, including print jobs queued to a printer queue. The spooler does not know what type of job it is queuing. When a queue is created, the function of the queue is defined by the spooler backend for that queue.
Spooler Parts The base operating system spooler can be viewed as a process or a subsystem with a beginning, points–in–between, and an ending. To accomplish its tasks, the base operating system spooler has four basic parts: 1. The enq command is the true entry point to the spooler, and as such is the beginning of any spooler activity. This command accepts requests for job processing. 2. The qdaemon is responsible for accepting and tracking all jobs submitted to the spooler by the enq command.
Spooler Data Flow: Commands and Backend Four commands can be used to submit a job to the base operating system spooler. These are lp, lpr, qprt, and enq. Each of these commands has a specific UNIX origin; lp originated with AT&T System V, lpr originated with BSD, and both qprt and enq originated with the base operating system. While a user can use any one of these four commands to submit a job to the spooler, the true entry point to the spooler is the enq command.
Figure 1. Printing with the Base Operating System rembak is a common backend when the remote printer queue simply points to a queue on another host, better known as a print server. While piobe can perform extensive manipulation of a print job, rembak just transfers jobs across TCP/IP networks to print servers.
Spooler Data Flow (enq Command) The commands lp, lpr, qprt, and enq can be used to submit a job to the spooler for processing. The enq command is the true entry point to the spooler; lp, lpr, and qprt all parse their own arguments and compose a call to enq. This can be demonstrated by executing the following steps as the root user at a shell prompt: 1. Enter mount /bin/echo /bin/enq. 2. Enter qprt –Pasc –fp –z1 –p12 –s courier –C –N 3 /etc/motd. 3. Enter umount /bin/enq.
Overview of Backend Processing The backend for a queue is begun by qdaemon; the qdaemon determines that a job’s turn to be processed has arrived, sets up an execution environment for the queue backend, constructs an argument vector for the backend, and, via fork and exec, causes the backend to begin execution. The number of simultaneous instances of the backend is controlled by the presence or absence of the file parameter in the stanza for this queue in the /etc/qconfig configuration file.
6. pioout 7. device driver Figure 2. Datastream Flow for Common Print Jobs When the device upon which the job is queued becomes available, the qdaemon invokes the backend for the queue. In the base operating system world, the backend is commonly piobe. The qdaemon invokes piobe and passes it arguments in the normal C programming language fashion, using argc and argv[].
argv[0] is the name of the backend itself, as usual. Note that the –Pasc, which specifies the queue name, was parsed out of the original argument vector, as were the –C and – N3 flags and arguments. piobe uses the argv[] values to construct a pipeline of filters that must be executed to process the job as requested. After determining the structure of the pipeline, piobe passes the structure to a shell for realization.
Virtual Printers and Formatter Filters When the spooler queue backend is piobe, the formatter filter is normally the next–to–last process in the pipeline of filters processing the print job. The formatter filter is composed of two pieces of code. A formatter filter provides the capability of either formatting the input print file or passing it through unmodified, based on an input parameter.
The formatter driver is invoked by a pipeline and is passed the name of a formatter to be driven. The formatter driver dynamically loads and links the formatter and calls the formatter’s setup function which indicates whether data formatting or data pass–through is requested. After the formatter’s setup function performs the necessary functions, it returns to the formatter driver. The formatter driver calls the initialize function.
/etc/qconfig Spooler Configuration File The /etc/qconfig file describes all of the queues defined to the base operating system. A queue is a named, ordered list of requests for a specific device. A device is something (either hardware or software) than can handle those requests one at a time. The queue provides serial access to the device. Each queue must be serviced by at least one device; often it can be handled by more than one device.
Following the tab–indented lines, the qdaemon must find the word that is the value of the device parameter followed by a colon; this line represents the beginning of the device stanza. This word, which a user normally does not need to know, is the name of a device to which the corresponding queue stanza provides serial access. There must be one or more lines indented by tabs following this line. One of these lines must be backend = full_path_name_to_backend.
ps: device = lp1 lp1: file = /dev/lp1 header = never trailer = never access = both backend = /usr/lib/lpd/piobe Each of these stanza pairs defines a queue. When the backend for a queue is piobe, each queue also has an associated virtual printer. While it is possible to create virtual printer definitions the hard way, virtual printer definitions are typically created at the same time as the queue definition, with SMIT and the piomkpq command. The virtual printer definition is not contained in /etc/qconfig.
Chapter 4.
Printer Backend Overview for Programming The base operating system printer backend receives and processes print requests from a spooler, usually the qdaemon command. The printer backend is a standard feature of the base operating system. It is implemented by the piobe command The printer backend supports all of the printers installed in the Object Data Manager (ODM) Predefined database. You can customize the printer backend to assist in the administration of the printing subsystem.
By default, stdin, stdout, and stderr are all open to the null device (/dev/null), although it is possible to override the setting of stdout (and possibly stdin) with the file and access fields in the qconfig file.
Virtual Printer Definitions and Attributes A virtual printer definition is a file that pairs the attributes or characteristics of a specific printer with the attributes of a specific data stream type. If a specific printer supports more than one data stream type, you must create a virtual printer definition, pairing the attributes of the printer with each data stream type. Thus, if a printer supports both ASCII and PostScript data streams, you must create two virtual printer definitions for the printer.
Attribute names for group headers begin with _ _ (two underscores) and must not be longer than five characters. A group header attribute marks the beginning of a group of related attributes. The following is a list of groups of virtual printer attributes addressed in this section.
Name Description _ _FLG VALUES THAT MAY BE OVERRIDDEN WITH FLAGS ON THE COMMAND LINE _1 Page Headings Wanted For Text Converted to PostScript? (!: no; +: yes) _2 Use Two Columns for Text Converted to PostScript? (!: no; +: yes) _3 Gaudy Mode Wanted for Text Converted to PostScript? (!: no; +: yes) _4 Print Garbage File Anyway for Text Converted to PostScript? (!: no; +: yes) _5 List Characters Not In Font When Converting Text to PostScript? (!: no; +: yes) _6 Font Name for Header Line of Text Converted to P
_ _SYS OTHER VALUES OF INTEREST TO THE SYSTEM ADMINISTRATOR sh Pipeline for Header Page si sp st sw %Ide/pioburst %F[H] %Idb/H.p s | %Ide/piofo rmat –@%Idd/%I mm –!%Idf/piof pt%f[j] Users, Separated by Commas, to Get Intervention Messages; Null String Is Job Submitter Command Line Flags Prohibited For All –d values; Ignored: cmnrBDMPRT Pipeline for Trailer Page %Ide/pioburst %F[H] %Idb/T.
_ _IDS PIPELINES FOR INPUT DATA STREAMS (2 char, 1st=”i”, 2nd=data stream name) ia Pipeline for Input Data Stream ”a” (extended /usr/bin/enscr ASCII) ipt –p– –q%?%G _2%t –2%;%?%G_ z%t –r%;%?%G_3 %t –G%;%?%G_1% t%e –B%;%?%G_L %t%e –c%;%?%Ch %t%fbh%e%?%L_h %t –b’%I_h’%;% ; –L%G_l%d –f% ?%Cs%t%f!s%e%I _s%;%G_p%d %?% G_1%t–F%Iw7%G_ p%d%;%?%G_4%t –g%;%?%G_5%t – o%;%?%L_f%t%e %I@1%; | %Iis il Command Line Flags Prohibited For Input Data /interleaf/ile Stream; Ignored: cmnrBDMPRT af5/bin/pl2ps –ppd IBM17521.
address the spooling subsystem, not the backend. Thus, listing one of these flags as a prohibited flag has no effect on the backend; the flag is not prohibited.
pass–through pipeline (the ip attribute) to be used to process the print file instead of the ASCII pipeline ( ia attribute). The pass–through pipeline causes the output from the filter to be passed to the printer unmodified. After the DVI filter has been specified in the fd attribute, you can send a print command such as lpr –d DviFile or qprt –fd DviFile.
_ _MIS MISCELLANEOUS mA Printer Data Stream Description mD Name of message catalog Containing Attribute Descriptors mF Path Name of Font File To Be Downloaded (must include download commands) mL Printer Description mN mY mc md mf mi mm mn mo mp mq Printer model number Datastream Mode to Which Printer is Restored at End of Job (0: IBM PPDS; 1: HP PCL; 2: Plotter; 3: PostScript) String to Send to Printer ”mz” Times When Job Is Cancelled Output Data Stream Type (example: ascii); Initialized By ”piodigest” Pat
_ _WKV WORK VARIABLES w7 Font Name for Header LIne of Text Converted to Postscript wl wu Smallest legal sheetfeeder drawer number Largest legal sheetfeeder drawer number %?%S_s%”Courie r”%=%tCourier– Bold%e%S_s%”Ti mes–Roman”%=%t Times–Bold%e%S _s%”Helvetica” %=%tHelvetica– Bold%e%S_s%”Ti mes–Italic”%=% tTimes–BoldIta lic%e%S_s%”Hel vetica–Oblique ”%=%tHelvetica –BoldOblique%e %Iw8%; 0 3 The colon file stores these same values as: :062:_ _WKV:: :472:w7::%?%S_s%”Courier”%=%tCourier–Bold%e%S_s%”Times–Roma
:052:_ _CTL:: :512:aF::%?%G_Y%ttrue duplex %?%G_Y%{1}%=%tfalse tumble%etrue tumble %;%efalse duplex%; :113:af::showpage :119:ar::%G_6%d setresolution :115:at::%G_u%d setpapertray Escape Sequences Attributes Escape sequence attributes begin with the letter e and are grouped under the _ _ESC group header attribute.
Printer Colon File Escape Sequences Embedded references and logic for attribute values in the printer backend’s database colon files are defined with escape sequences placed at appropriate locations in the attribute string. These escape sequences are not to be confused with printer escape sequences. The first character of each escape sequence is always the % (percent sign) character, which indicates the beginning of an escape sequence.
Input String: %Ixx Includes the string attribute whose name is xx. %I and can be used recursively; that is, the included string can also contain a %I. Note that the included string does not inherit the current stack. Instead, it is assigned a new stack. %I[ . . . ] If multiple, contiguous includes are to be done, the attribute names can be separated by commas and enclosed with brackets. For example, the string %Icp%Icc%IeW can be specified as %I[cp,cc,eW].
Input Integer To Stack: %#xx”..@..” Extracts a selected portion of the string attribute named xx. The selection criteria is defined by the pattern ”...@...”. The selection pattern consists of three parts: 1. sThe string immediately preceding the string to be extracted. If the prefix regular expression is missing, the extracted string consists of the entire string preceding the pattern specified by the suffix regular expression. 2. The extracted string replaces the %#xx”..@..
Internal Variables: Internal variables a through z are integer variables for use by %P, %Z, and %g. They are initialized to zero and their values change only if a %P or %Z changes them. There are two independent sets of these variables: one set is used by the piobe command for building pipelines, while the other set is used exclusively by a formatter. The values for a formatter’s set are maintained for the duration of the formatter’s processing.
Relational and Logical Operators: %= %> %< %! Pushes a value of 1 if true, or 0 if false, onto the stack. %= Are the first two values that are popped off the stack equal? For example, %{2}%{2}%= pushes a value of 1 (true) onto the stack, and %{2}%{3}%= pushes a value of 0 (false) onto the stack. %> Is the second value popped off the stack greater than the first value popped off the stack? For example, %{2}%{3}%> pushes a value of 0 (false) onto the stack.
%{2} pushes a value of 2 onto the stack %e else %{3} pushes a value of 3 onto the stack %; endif %d Outputs the value in ASCII format Pass–through: %x (The piocmdout subroutine call only.) Pass through from input to output the number of bytes specified by the passthru argument to the piocmdout subroutine. Loops %wx While loop. Whenever a matching %; is reached, the value of the internal variable x (x can be a through z) is decremented by one.
Command Line Flags: These operators are usually used in pipeline definitions, where they apply to flags specified by the print job submitter. If specified in attribute strings used by a formatter, they apply to the flags passed to the formatter. Valid flag letters are a through z, A through Z, and 0 through 9. %Cy Pushes a value of 1 (true) onto the stack if flag y was specified on the command line. Otherwise, pushes a value of 0 (false) onto the stack. %Fxy or %F[...] Shorthand for %?%Cy%t–x %I_y%;.
Printer Colon File Conventions Printer and printer data stream attributes reside in colon files. Colon files reside in the /usr/lib/lpd/pio/predef and /var/spool/lpd/pio/@local/custom/* directories. The /usr/lib/lpd/pio/predef directory contains the predefined database and the /var/spool/lpd/pio/@local/custom/* directory contains the customized database. The following sections describe the conventions for printer and attribute names and values in colon files.
Attribute Names The following conventions have been established for virtual printer attribute names: • Each attribute name must be unique. • Attribute names can contain the characters a through z, A through Z, 0 through 9, and _ (underscore). The name cannot begin with a numeral. • All attribute names must be two characters long (except group header attribute names, which can be five characters long).
@A Number of bytes already printed. @B Total number of bytes to print. @C Number of times to send the cancel string (@D) to the printer at print job cancel. @D String to send to the printer if the print job is canceled. @I User to which to send intervention required messages. @O Name of file to be generated by the pioout command in which to store data instead of sending it to the printer.
Attribute Values The following conventions have been established for attribute values: • Printer names are of the form 4201–3, reflecting the printer name ( 4201 ) and model number ( 3 ). • File names in the Predefined Database are of the form PrinterType. DataStreamType; for example, 4216–31.asc indicates a 4216 Model 31 printer and an ASCII data stream. • File names in the Customized Database are of the form QueueName:QueueDeviceName, such as proq:mypro.
• values_msg_id • help_msg_id • help_msg_loc Validation Information Validation information validates attribute values when the colon file is complete and a print job is submitted.
Example of Print Formatter This example shows how print formatters can interact with the documented printer formatter subroutines. The procedure for writing a print formatter involves four steps: 1. Creating a print formatter source file as shown below 2. Creating an imports file 3. Creating an exports file 4. Compiling and linking the print formatter Create the Print Formatter Source File Use an ASCII editor to create a formatter source file named sample.c.
/* TABLE OF ATTRIBUTE VALUES */ struct attrparms attrtable[] = { /* name data type lookup address of pointer */ ”_b”, VAR_INT, NULL, (union dtypes *) &_Bmarg, ”_g”, VAR_INT, NULL, (union dtypes *) &_Beginpg, ”_i”, VAR_INT, NULL, (union dtypes *) &_Indent, ”_j”, VAR_INT, NULL, (union dtypes *) &_Init_printer, ”_l”, VAR_INT, NULL, (union dtypes *) &_Pglen, ”_t”, VAR_INT, NULL, (union dtypes *) &_Tmarg, ”_w”, VAR_INT, NULL, (union dtypes *) &_Pgwidth, ”_J”, VAR_INT, NULL, (union dtypes *) &_Restoreprinter, ”_Z
lineout(fileptr) /*** Format a Line ***/ FILE *fileptr; { int ch, charcount = 0; for (ch = 0; ch < Indent; ch++) pioputchar(’ ’); while ((ch=piogetc(fileptr)) != ’\n’ && ch != EOF && charcount < Pgwidth) { charcount++; pioputchar(c); } vpos += Vincr; return(charcount); } passthru() /*** Pass–through Option ***/ { int ch; while ((ch = piogetc(stdin)) != EOF) pioputchar(ch); if (piodatasent && Do_formfeed) (void) piocmdout(FF_CMD, NULL, 0, NULL); return(0); } restore() /*** Restore the Printer ***/ { if (Rest
Understanding the Interaction between qdaemon and the Backend The qdaemon and the backend communicate through a status file. Understanding Backend Routines in libqb on page 4-34 explains the set of library routines that the backend should use to fulfill these communication requirements. These routines are in the /usr/lib/libqb.a library. Using the Status File When the qdaemon process invokes a backend, it passes the following parameters, in order: 1. The parameters appearing in the /etc/qconfig file. 2.
Updating Job Status Information The qchk command displays information about currently running jobs, including the originator, title, number of pages to be printed, and percentage completed. All this information comes from the status file. Most of the information is set up by the qdaemon when the backend is first invoked, except the pages printed and percent done fields, which must be filled in by the backend itself.
EXITFATAL The job could not be finished because of a problem in the device that requires manual intervention. The qdaemon sets the state of the device (displayed by qchk) to OFF, sends a message to the console, and does not run any further jobs on that device until someone has explicitly set its state to ON again (with an enq –Pqueuename –U command). EXITSIGNAL The backend was interrupted by a SIGTERM signal (#include ). EXITWARN The backend has issued a warning to the qdaemon.
Message Format Each message sent by the printer backend consists of a message header frame, zero or more parameter header frames, a fully expanded message, and text consisting of zero or more parameters. The message header specifies the message type, message catalog information, length of expanded message text, and the number of variable message parameters. The variable message parameters are used to build the expanded message text from the basic message text that is extracted from the message catalog.
pointers to null strings. The print supervisor then calls the sprintf subroutine or a similar subroutine and passes the nine variable parameter pointers as parameters to the function. • The printer backend specifies the correct type (integer or string) for each parameter, even though all parameters are passed in the pipe as strings. The appropriate type must be used for handling field width and precision when placing a parameter in an extracted message.
Understanding Backend Routines in libqb This article defines the set of library routines that the backend should use to communicate with the qdaemon process. These routines are in the /usr/lib/libqb.a library; they were designed to make the task of writing a backend as easy as possible. These backend routines are available using the ld or cc command–line option –lqb. For information on using these routines with the backend, see Understanding the Interaction between qdaemon and the Backend on page 4-29.
get_to() Returns an array of characters containing the name of the person for whom the job is intended. The return value is of type char*. get_was_idle() Returns TRUE if the printer was idle at job beginning (useful for paper feed: feed/no feed). Returns the charge for printing the current job. log_charge (charge) int charge; Returns the charge for printing the current job. log_init Initializes certain data common to the library routines.
put_header( fnaddr, width ) Prints a header page with no following form–feed and returns the number of lines printed. The fnaddr and width parameters are optional. int (* fnaddr ); The fnaddr parameter defines the format subroutine used to display characters on the header page. The default is the putchar subroutine. int * width; The width parameter defines the width of the form. The default value for the width parameter is 80.
Printer Code Page Translation Tables Translation of code points in the print file to code points for the printer is a two–stage process (translation of code points for Oriental languages is handled differently). The first stage translates code points from the print file to code points in an intermediate code page. The intermediate code page consists of 16–bit integer code points for all supported characters. The intermediate code page is defined in the /usr/lib/lpd/pio/etc/codepage.txt file.
translation table in the ring that can print the character, it prints a substitute character (underscore) instead. The following example C language code generates a stage–2 translation table named XYZ.999, which translates code points from the intermediate code page to code points for the printer’s code page. The c1 attribute is assumed to contain the printer command string that will cause the printer to select code page XYZ.999. #include #include
Printer Code Page Translation for Multibyte Code Sets Multibyte code set (MBCS) translation from the print file to the code set differs from translation for single–byte code set (SBCS) code points. Translation from print file to code set in multibyte environments is a two–stage process. During the first stage of code–set translation, the input code set of the print file is translated to a process code set.
2. Define the translation table in the trans.dir file. The format to define a new code set named NewCodeSet is: newcodeset IBM–943 newcodeset_IBM–943 3. Define the alias name in the trans.alias file, if needed. 4. Append the code set name as input code in a colon file, for example: ::Ti::[NewCodeSetName, ...]IBM–943, ...
Translation Table Example #include struct trans_table /*Translation Table Structure { unsigned int reserv1; /* Reserved unsigned int f_cp; /* From code point unsigned int reserv2; /* Reserved unsigned int t_cp; /* To code point }; /* *Table to translate code points for input code set(NewCodeSet) *to code points for the process code set(IBM–943). */ struct trans_table table[] = { {0x0,0x81ca,0x0,0xfa54},{0x0,0x9e77,0x0,0x954f},\ {0x0,0x9e8d,0x0,0x938e}, /* ....
Printer Attachment Files Attachment files provide a simple interface for developers of printer attachments to create System Management Interface Tool (SMIT) screens that support new printer attachments.
Structure of Attachment Files Attachment files are ASCII files. Each line in an attachment file defines a field using the following format: FieldName = Value The following field names have special meanings in the attachment file: • description • seq_num • supported • unsupported The following field names define SMIT selector IDs. The Value variable must contain a SMIT selector ID. The selector ID value of each field specifies the target of the branch.
Attachment File Field Definitions The following field definitions detail the attachment type fields, formats for the field values, and practical examples of field values. description Specifies the description string that appears on the SMIT Attachment type menu. The SMIT Attachment type menu lists all supported attachment types on the system. This field is required in order for the attachment type to appear on any list of supported types.
add_printer Specifies the name of the SMIT selector ID to branch to in order to add a printer to an existing queue. Functionally, this adds an additional queue device to an existing queue. To branch to the term_serv_printer selector ID from the SMIT Existing Print Queue menu option, enter: add_printer = term_serv_printer remove_queue Specifies the name of the SMIT selector ID to branch to in order to remove a print queue.
Operators for Limits Field in the Printer Colon File The limits field in the colon file contains two types of information: • SMIT dialog information • Validation information The SMIT dialog information is used to build SMIT objects to represent colon file attributes in the Object Data Manager (ODM) database. Objects are used in the Print a File, Printer Setup, and Default Job Characteristics dialog screens.
In another example, when the limits field contains ’[none,full,emulator=0,1,2]’ then the sm_cmd_opt object class contains the following values: Field Name disp_values aix_values Values none, full, emulator 0,1,2 The limits field operators provide the following types of control in SMIT: • Attribute display • Characteristics of the field representing the attribute • Attribute validation and the type of auxiliary operations (for example, pop–up menus or ring lists) For example, in the qprt and admvirprt SMIT
Display Operators C Defines how multiple flags relate within the SMIT dialog, how the options for the flags are displayed, and what flags and options are available. To support interdependent flags (for example, flags that affect typestyle and pitch), combinations of flags must be used. Typically, there is a single match between a SMIT dialog field and a command line flag. The combination flag operator allows one field in a SMIT dialog to represent more than one command line flag.
Field Characteristics Operators E Controls the entry_type field of the sm_cmd_opt object. The possible values for the E option are: # Indicates that numerical entry is allowed. f Indicates that a file entry is allowed. A valid file name must be specified. n Indicates no entry is allowed. The field cannot accept typed input. r Indicates an alphanumeric entry is allowed. t Indicates that text entry is allowed. x Indicates that a hexacimal entry is allowed.
Auxiliary Operations and Validation Operators Auxiliary operations for the SMIT dialog definitions determine the type of list and input required from the user. The types of lists available in the dialogs are list, multi–select list, range list, option ring, or multi–select option ring. The limits field operators that specify the type of auxiliary operation used by an attribute are L, M, G, and R. Only one type of auxiliary operation is supported at a time. The default is op_type=n.
L Specifies that a pop–up list is displayed when the user selects F4. The pop up list allows users to select only one option from a given list of options. The pop up list is constructed from the cmd_to_list field values. The op_type field value for a pop up menu is l (lowercase L). Validity checking is done only when typed user input is prohibited. The entry type for a field that does not allow direct user input is n. The cmd_to_list field returns a newline–separated list.
T Allows multiple selections to be made from a pop up list and works identical to the R operator. The multi–select field equals m. To allow multiple choices to be made from a pop up menu, enter: :100:_l:T[none,full,emulator=0,1,2]:0 V Specifies additional validation for any attribute. The V operator does not affect how an ODM stanza is built for an attribute. The data specified with the V operator is colon file type code (% operators). The % operators do the validation.
Adding a Printer Using the Printer Colon File Prerequisite Tasks or Conditions • The printer must be physically attached to your system. • Compare the similarities and differences between the printer you want to add and the currently supported printers. To see a list of supported printers, use the lsdev (list devices) command, or see Listing all supported and defined printers on page 2-41. • You must understand the printer colon files and their format.
4-54 %Sxx Pushes a pointer to the current string value for the xx attribute onto the stack. The only operation that can be performed on the string pointer is to use %= to compare the string with another string whose pointer is also on the stack. %Lxx Pushes the length of the xx constant or variable string onto the stack. For example, if the value of attribute ss is IJKLMN, the sequence ABC%Lss%dDEFG produces the string ABC6DEFG.
Printer–Specific Information The format and content of the header and trailer pages can be customized by editing the files containing the prototype text. These files are in the /usr/lib/lpd/pio/burst directory. The file names are in the format X.yyy, where X is either H to indicate header pages or T to indicate trailer pages. yyy indicates the type of data stream: ascii for ASCII, ps for PostScript, or gl for plotter emulation. For example, the file named H.
• Lexmark Optra Plus LaserPrinter on page 4-81 • Lexmark Optra Color 1200 Printer on page 4-84 • Lexmark Optra Color 40 Printer on page 4-87 • Lexmark Optra Color 45 Printer on page 4-89 • Lexmark Optra K 1220 Printer on page 4-91 • Lexmark Optra C Color LaserPrinter on page 4-94 • Lexmark Optra E LaserPrinter on page 4-97 • Lexmark Optra N LaserPrinter on page 4-100 • Lexmark Optra E310 Laser Printer on page 4-105 • Lexmark Optra M410 Laser Printer on page 4-108 • Lexmark Optra Se Lase
If you need support for Greek or Turkish characters, complete the following steps: 1. You must have a Language Group 3 font diskette installed in the printer. 2. As the root user, enter smit chpq. 3. Select the appropriate print queue and select Printer Setup on the Change/Show Characteristics menu. For the font diskette, specify: – CP851 to print Greek characters. – CP853 to print Turkish characters.
Notes: a. The Japanese Base System Locale Package must be installed to print Japanese characters. b. Japanese characters cannot be printed with PostScript option. c. To print multibyte characters, specify 16x16 or 32x32 dot font with the –F option using the qprt command. For example: qprt –Pkji –F’RomanKn23,Kanji23,IBM_JPN23’ file IBM 4037 and IBM 4039 LaserPrinter The system selects the IBM ASCII or PCL emulation data stream without manual intervention.
parameter (for example /dev/fd1 ) is needed only if the diskette device is not /dev/fd0, the standard 3.5–inch diskette drive. Note: If Greek or Turkish fonts have been installed, you must enter the following to download the fonts whenever the printer is turned off and on: splp –F! xxx where xxx is the device name of the printer, such as lp0. This instructs the system to download the Greek or Turkish font to the printer.
IBM 5202 Quietwriter III Although this printer detects the presence of a font cartridge, the host system cannot. You must tell the system about the font cartridge in any of the following instances: • Plug in a font cartridge that includes a font in Code Page 850. • Print using the font. • Print characters unique to Code Page 850 (European characters). To tell the system about the font cartridge: 1. Enter the SMIT fast path: smit chpq 2.
IBM Network Color Printer The predefined files support the IBM Network Color Printer 2.0 or higher controller code level. Additional qprt option flags that are valid using only the Network Color Printer PS queue: –e # Specifies brightness level. 0 Default Printer Setting 1 Lightest 2 Lighter 3 Light 4 Normal 5 Dark 6 Darker 7 Darkest –E # Specifies the finish. 0 Default Printer Setting 1 Normal 2 Matte 3 Glossy –k # Specifies the color model.
–K # Specifies the color rendering dictionary. 0 Default Printer Setting 1 Scanner 2 Highlight 3 Photographic 4 Presentation 5 Monitor 6 Solid Color –S # Specifies the print mode. 0 Default Printer Setting 1 Photo Quality 2 Business Graphics The following valid queue names are located on the IBM Network Color Printer: ibmcolor_direct 1.03 or 1.1 controller code and 16MB of memory. ibmcolor_print 1.03 or 1.1 controller code and 32MB or 48MB of memory. ibmncp_direct 2.
The IBM Network Printer 12, 17, and 24 support the following fonts and pitches: courier 10, 12, or 17 pitch courier–bold 10, 12, or 17 pitch courier–italic–bold 10, 12, or 17 pitch lettergothic 10, 12, or 17 pitch lettergothic–bold 10, 12, or 17 pitch lettergothic–italic 10, 12, or 17 pitch lineprinter 17 pitch For example, entering the following command qprt –s Lineprinter –p 17 FileName causes the file FileName to be printed in lineprinter font at 17 pitch (17 characters per inch).
10 Mail Box Bin 10 50 Offset Bin –= value (#) destination output bin IBM Network Printer 24 0 Auto Output Bin 1 Main Output Tray 2 Face–up (Rear Bin) 3 Upper Finisher Bin Face–down 4 Middle Finisher Bin Face–down 5 Lower Finisher Bin Face–down 6 Upper Finisher Bin Face–up 7 Middle Finisher Bin Face–up 8 Lower Finisher Bin Face–up 9 Auto Finisher Bin Face–down The following additional qprt option flags are valid using the PS or PCL queue of the Network Printer 24 only: –e # Specifi
IBM InfoPrint 20 –q # Specifies print quality options. The –q options for the InfoPrint 20 are: 600 Specifies 600 dpi 1200 Specifies 1200dpi. This produces prints that appear to have twice the actual printer resolution. 1200dpi print quality is recommended for printing data such as images that were created at 1200dpi. –u # Sets the paper source.
–Q # Specifies paper size for the print job.
–s Name Specifies a type style with the Name variable.
IBM InfoPrint 32 Printer –= # Type of Output Paper Handling. 0 Default Printer Setting 1 Main (Face Down) 2 Face–up (Rear Bin) 3 Finisher Bin 1 (Face Down Top) 4 Finisher Bin 2 (Face Down Middle) 5 Finisher Bin 3 (Face Down Bottom) 9 Any Finisher Bin (Face Down) –e # Specifies Staple/Collation. This option flag only works if a face down finisher bin is selected (See –= option flag).
–u # Sets the paper source to one of the following: 0 Use Current Input Source Selected on Printer 1 Tray 1 2 Auxiliary Tray – Manual Feed (for papers) 3 Auxiliary Tray – Manual Feed (for envelopes) 4 Auxiliary Tray (automatic) 5 Tray 2 6 Envelope Tray 7 Tray 3 8 Tray 4 9 Tray 5 –z # Rotates page printer output the number of quarter–turns clockwise as specified by the Value variable. The length (–l) and width (–w) values are automatically adjusted accordingly.
–Q # Specifies paper size for the print job 1 Letter 2 Legal 3 Folio 4 11x17 5 A4 6 B4 7 A3 8 Universal Paper Size 9 B5–JIS 10 A5 11 Executive 12 Statement 13 Hagaki 14 Monarch Envelope 15 COM10 Envelope 16 C5 Envelope 17 DL Envelope 18 Universal Envelope Size 4-70 Guide to Printers and Printing
IBM InfoPrint 40 Printer –= # Type of Output Paper Handling. 0 Default Printer Setting 1 Main (Face Down) 2 Face–up (Rear Bin) 3 Finisher Bin 1 (Face Down Top) 4 Finisher Bin 2 (Face Down Middle) 5 Finisher Bin 3 (Face Down Bottom) 9 Any Finisher Bin (Face Down) –e # Specifies Staple/Collation. This option flag only works if a face down finisher bin is selected (See –= on page 4-71 option flag).
–u # Sets the paper source to one of the following: 0 Use Current Input Source Selected on Printer 1 Tray 1 2 Auxiliary Tray – Manual Feed (for papers) 3 Auxiliary Tray – Manual Feed (for envelopes) 4 Auxiliary Tray (automatic) 5 Tray 2 6 Envelope Tray 7 Tray 3 8 Tray 4 9 Tray 5 4-72 Guide to Printers and Printing
–Q # Specifies the paper size for the print job.
Canon LASER SHOT LBP–B404PS/Lite The Japanese PostScript and ASCII data streams are supported. Japanese language text files cannot be printed. Canon LASER SHOT LBP–B406S/D/E/G, A404/E, A304E The Japanese code sets are supported. Do not use the IBM 5575 emulation card. The lips3 queue cannot be used for models LBP–B406S/D,A404 with LIPS II+ mode. Dataproducts LZR 2665 Laser Printer The data stream (PostScript, Diablo 630) must be selected manually, using the control panel.
If an optional High Capacity Output (HC0) device is installed, the additional trays are available as well. The base operating system supports up to eight of the HC0 output bins for the HP 5Si printer, and up to 5 for the HC0 output bins and a stapler bin for the 5Si Mopier. The output bins can be accessed using the (–=) flag of the qprt command. The following table shows the possible values and the corresponding output bin destination.
The output bins can be accessed using the (–=) flag of the qprt command. The following table shows the possible values and the corresponding output bin destination.
Lexmark 4227 Forms Printer Paper Source Paper source selection is supported by using the –u flag of the qprt command. –u 1 tractor 1 –u2 tractor 2 The banner and trailer pages use the same source as the print job. It is suggested that the printer be attended when switching between tractors. Pitch, Font, and Quality Pitch selection is supported by using the –p flag for the pitch, the –s flag for font name, and –q flag of the qprt command for print quality.
Lexmark Optra Laser Printer Paper Source Paper source selection is supported for both the enhanced PCL (R) 5 emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources. The input source number is the same for both PCL and PostScript: –u 0 manual feed –u 1 tray 1 –u 2 tray 2 –u 3 tray 3 –u 4 feeder or feeder 1 –u 5 feeder 2 By default the banner and trailer pages come from the top tray.
Paper Type The Optra printer supports paper types: rough, normal (default), transparency, labels, and cardstock using the –y parameter of the qprt command or the _y attribute in the colon file. –y 1 Rough –y 2 Normal (default) –y 3 Transparency –y 4 Labels –y 5 Cardstock Print Resolution The Optra plus printer supports print resolution of 300, 600, and 1200 dpi using the –q flag of the qprt command. The default is 600 dpi.
Pitch Pitch selection is supported for the PCL 5 emulation by using the –p flag for pitch and the –s flag for font name with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra Plus LaserPrinter Paper Source Paper source selection is supported for both the enhanced PCL (R) 5 emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources. The input source number is the same for both PCL and PostScript: –u 0 manual feed –u 1 tray 1 –u 2 tray 2 –u 3 tray 3 –u 4 feeder or feeder 1 –u 5 feeder 2 By default the banner and trailer pages come from the top tray.
Paper Type The Optra Plus printer supports paper types: rough, normal (default), transparency, labels, and cardstock using the –y parameter of the qprt command or the _y attribute in the colon file. –y 1 Rough –y 2 Normal (default) –y 3 Transparency –y 4 Labels –y 5 Cardstock Print Resolution The Optra Plus printer supports print resolution of 300, 600, and 1200 dpi using the –q flag of the qprt command. The default is 600 dpi.
Duplex Mode The optional duplex feature is supported by the –Y flag of the qprt command. –Y 0 simplex –Y 1 duplex, long–edge binding –Y 2 duplex, short–edge binding Collation The Optra Plus printer supports collation of multiple copies of a print job internally. This feature is controlled by the –W and –S flags of the qprt command. –S ! collation off –S + collation on –S # number of copies Note: This function is independent of the –N flag of the qprt command.
Lexmark Optra Color 1200 Printer Paper Source Paper source selection is supported for both the PCL 5 emulation and the PostScript Language by using the –u flag of the qprt command. –u 0 manual feed –u 1 tray 1 –u 2 tray 2 –u 3 tray 3 –u 4 multipurpose feeder By default the banner and trailer pages come from the tray 1. To change the default, change the values for the uH and/or uT attributes respectively in the colon file to the value for the desired paper source.
Paper Size Paper size selection is supported by using the qprt command flags, –O and –Q. The –O flag controls paper versus envelope. A –O value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility. The first five paper sizes are also numbered for backward compatibility. Whenever an invalid value for the input source is selected, it will be ignored. Note: Envelopes are available through Manual and MP Tray only. The default for –O is 3 or paper.
Pitch Pitch selection is supported for the PCL emulation by using the –p flag for pitch and the –s flag for font name (or type face). Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra Color 40 Printer Paper Source Paper source selection is supported for both the PCL 5 emulation and the PostScript Language by using the –u flag of the qprt command. –u 0 manual feed –u 1 tray 1 Paper Size Paper size selection is supported by using the qprt command flags, –O and –Q. The –O flag controls paper versus envelope. A –O value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility.
Pitch Pitch selection is supported for the PCL emulation by using the –p flag for pitch and the –s flag for font name (or type face). Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra Color 45 Printer Paper Source Paper source selection is supported for both the PCL 5 emulation and the PostScript Language by using the –u flag of the qprt command. –u 0 manual feed –u 1 tray 1 Paper Size Paper size selection is supported by using the qprt command flags, –O and –Q. The –O flag controls paper versus envelope. A –O value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility.
Pitch Pitch selection is supported for the PCL emulation by using the –p flag for pitch and the –s flag for font name (or type face). Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra K 1220 Printer Paper Source Paper source selection is supported for both the ”enhanced PCL (R) 5e emulation” and the ”PostScript (tm) Level 2 emulation” by using the –u flag of the qprt command. There are several optional input sources (see your manual to determine which are installed). These numbers apply, no matter which ones are present. If one is not present, choosing one of those will simply default as per the user’s manual.
Paper Size Paper size selection is supported by using either one or both of the qprt command flags, –O and –Q. The –O flag controls paper versus envelope. A value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility. Envelopes are only valid for manual feed, envelope feeder, or the multipurpose tray. The default for –Q is 1 or Letter for paper sizes and 3 or Com 10 for envelope sizes.
Pitch Pitch selection is supported for the PCL emulation by using the –p flag for pitch and the –s flag for font name (or type face). Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra C Color LaserPrinter Printing Color Files in PCL To print color files, or any preformatted print job in PCL 5 Emulation Mode language, use the –dp flag of the qprt command. This sets the base operating system printer backend to passthrough mode and should be used any time you are printing from an application in PCL emulation. The print queue default can be changed to passthrough by modifying the _d attribute in the colon file. See AIX 5L Version 5.
Pitch Pitch selection is supported for the PCL 5 emulation by using the –p flag for pitch and the –s flag for font name with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Collation The Optra C printer supports collation of multiple copies of a print job internally. This feature is controlled by the –W and –S flags of the qprt command. –S ! collation off –S + collation on –S + number of copies Note: This function is independent of the –N flag of the qprt command. The –N# flag will cause the print job to be sent to the printer # times. The –W# will send the print job once, and # copies of the job will be printed.
Lexmark Optra E LaserPrinter Paper Source Paper source selection is supported for both the PCL 5 emulation and the PostScript Language by using the –u flag of the qprt command. PCL –u 1 manual feed –u 2 top tray –u 3 bottom tray By default the banner and trailer pages come from the top tray. To change the default, change the values for the uH and/or uT attributes respectively in the colon file to the value for the desired paper source (s1–s3). Use the lsvirprt command.
Paper Type The Optra E printer supports paper types: rough, normal (default), transparency, labels, and cardstock using the –y parameter of the qprt command or the _y attribute in the colon file. –y 1 Rough –y 2 Normal (default) –y 3 Transparency –y 4 Labels –y 5 Cardstock Note: These values apply only to paper and not envelopes. The only values supported for tray 2 are rough and normal.
Pitch Pitch selection is supported for the PCL 5 emulation by using the –p flag for pitch and the –s flag for font name with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra N LaserPrinter Paper Source Paper Size Paper source selection is supported for both the enhanced PCL (R) 5 emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources (see your printer documentation to determine which are installed). The optional input sources apply no matter which ones are installed. If one is not present, choosing one will use the default.
To change the defaults, change s0 – s5 attributes for each valid input value. Because manual feed, envelope feeder, and the multipurpose tray support both paper and envelopes, to change the defaults, edit s0, s4, or s5. For these three, the default for paper is the “else” part (%e1), and the default for envelopes is the “then” part (%t3). Notes: 1. Envelopes are only valid for manual feed, envelope feeder, or the multipurpose tray. 2. Trays 1, 2, and 3 support only paper sizes. 3.
Note: To format ASCII for other font styles, use the base operating system enscript utility or the qprt command with the –da, –s, and –p flags to a PostScript queue. For PostScript queues, –p stands for point size and the valid list of fonts are located in /usr/lib/ps/fontmap. Valid point sizes are any integer from 1 to 1008. Also, only a pitch of 17 is supported for the lineprinter font style.
Note: This function is independent of the –B flag of the qprt command. Output Bin The equal sign (=) is the command line option for specifying the output destination. Valid values are: 0 printer top bin 1 finisher bin 1 2 finisher bin 2 3 finisher bin 3 50 printer side bin The printer top bin or 0 is the default value for the output bin. Note: If the printer side bin is selected and the finisher option is installed, the output will go to the active bin.
4-104 Guide to Printers and Printing
Lexmark Optra E310 Laser Printer Page Rotation Page rotation selection is supported for the PCL 5 emulation by using the –z flag of the qprt command. –z 0 Portrait –z 1 Landscape Paper Source Paper source selection is supported for both the enhanced PCL 5 emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. The input source number is the same for both PCL and PostScript: –u 0 manual feed –u 1 tray 1 By default, the banner and trailer pages come from the top tray.
Paper Type The Optra E310 printer supports paper types ROUGH, NORMAL (default), TRANSPARENCY, LABELS, and CARDSTOCK via the –y parameter to the qprt command, or the –y attribute in the colon file. The values to the –y option are 1 through 5 respectively for the above types. –y 1 Bond –y 2 Plain –y 3 Transparency –y 4 Labels –y 5 Cardstock Note: These values do not apply to envelopes.
Pitch Pitch selection is supported for the PCL emulation by using the –p flag for pitch and the –s flag for font name (or type face) with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra M410 Laser Printer Page Rotation Page rotation selection is supported for the PCL 5e emulation by using the –z flag of the qprt command. –z 0 Portrait –z 1 Landscape Paper Source Paper source selection is supported for both the enhanced PCL (R) 5e emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources (see your manual to determine which are installed). These numbers apply, no matter which ones are present.
Paper Size Paper size selection is supported by using either one or both of the qprt command flags, –O and –Q. The –O flag controls paper versus envelope. A – O value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility. Envelopes are only valid for manual feed, envelope feeder, or the multipurpose tray. The default for –Q is 1 or Letter for paper sizes, and 3 or Com 10 for envelope sizes.
Pitch Pitch selection is supported for the PCL 5 emulation by using the –p flag for pitch and the –s flag for font name (or type face) with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Lexmark Optra Se Laser Printer Page Rotation Page rotation selection is supported for the PCL 5e emulation by using the –z flag of the qprt command. –z 0 Portrait –z 1 Landscape Paper Source Paper source selection is supported for both the enhanced PCL (R) 5e emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources (see your manual to determine which are installed). These numbers apply, no matter which ones are present.
Paper Size Paper size selection is supported by using –O and –Q flags of the qprt command. The –O flag controls paper versus envelope. A – O value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility. Envelopes are only valid for manual feed, envelope feeder, or the multipurpose tray. The default for –Q is 1 or Letter for paper sizes, and 3 or Com 10 for envelope sizes.
Pitch Pitch selection is supported for the PCL 5 emulation by using the –p flag for pitch and the –s flag for font name (or type face) with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Separator Pages The –E flag controls separator pages. The valid values are 0, 1, 2, and 3, which represent NONE, BETWEENCOPIES, BETWEENJOBS, and BETWEENPAGES, respectively. The separator page source defaults to TRAY 1 and is specified via the uS attribute. The valid values for uS are the same as for header and trailer pages (uH and uT respectively), except that the Manual Feeder is not supported.
Lexmark Optra T Laser Printer Family Page Rotation Page rotation selection is supported for the PCL 5e emulation by using the –z flag of the qprt command. –z 0 Portrait –z 1 Landscape Paper Source Paper source selection is supported for both the enhanced PCL (R) 5e emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources (see your manual to determine which are installed). These numbers apply, no matter which ones are present.
Paper Size Paper size selection is supported by using –O and –Q flags of the qprt command. The –O flag controls paper versus envelope. A – O value of 3 indicates a paper size and 4 an envelope size. The values 1 and 2 were skipped for backward compatibility. Envelopes are only valid for manual feed, envelope feeder, or the multipurpose tray. The default for –Q is 1 or Letter for paper sizes, and 3 or Com 10 for envelope sizes.
Pitch Pitch selection is supported for the PCL emulation by using the –p flag for pitch and the –s flag for font name (or type face) with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Separator Pages The –E flag controls separator pages. The valid values are 0, 1, 2, and 3, which represent NONE, BETWEENCOPIES, BETWEENJOBS, and BETWEENPAGES, respectively. The separator page source defaults to TRAY 1 and is specified via the uS attribute. The valid values for uS are the same as for header and trailer pages (uH and uT respectively), except that the Manual Feeder is not supported.
Lexmark Optra W810 Laser Printer Page Rotation Page rotation selection is supported for the PCL 5 emulation by using the –z flag of the qprt command. –z 0 Portrait –z 1 Landscape Paper Source Paper source selection is supported for both the enhanced PCL (R) 5 emulation and the PostScript Level 2 emulation by using the –u flag of the qprt command. There are several optional input sources (see your manual to determine which are installed). These numbers apply, no matter which ones are present.
Paper Size Paper size selection is supported by using the –Q flag of the qprt command. The first five paper sizes are also numbered for backward compatibility. Whenever an invalid value for the input source is selected, it will be ignored. The default for –O is 3 or paper. The default for –Q is 1 or Letter for paper sizes and Monarch for envelope sizes. Paper Sizes –Q 1 Letter –Q 2 Legal –Q 3 B5 Paper –Q 4 A4 –Q 5 Executive –Q 6 A5 –Q 7 B4 –Q 8 A3 –Q 9 Ledger (11x17) –Q 10 Universal (11.69x17.
Pitch Pitch selection is supported for the PCL 5 emulation by using the –p flag for pitch and the –s flag for font name (or type face) with the qprt command. Pitch values between 1 and 100 characters per inch (cpi) in whole integers are supported. The condensed print flag, –K, is not supported.
Collation and Number of copies The optra W810 printer supports collation of multiple copies of a print job internally. This feature is controlled by the –W and –S flags of the qprt command. –S! collation off –S+ collation on –W# number of copies Notes: 1. This function is independent of the –N flag of the qprt command. The –N# flag will cause the print job to be sent to the printer # times. The –W# flag will send the print job once, and # copies of the job will be printed. 2.
Finisher Offset The Optra W810 printer supports this option if it has an optional Finisher installed. The valid values for e are: –e 0 Off –e 1 On Hole Punch The Optra W810 printer supports this option if it has an optional Finisher installed. The valid values for o are: –o 0 Off –o 1 On Output Destination The –= (equal sign) is the command line option for specifying the output destination.
Lexmark Plus Printer Models 2380–3, 2381–3, 2390–3, 2391–3 Paper Source Paper source selection is supported by using the –u flag of the qprt command. –u 1 tractor 1 –u2 tractor 2 The banner and trailer pages use the same source as the print job. It is suggested that the printer be attended when switching between tractors.
Pitch, Font, and Quality Pitch selection is supported by using the –p flag for the pitch, the –s flag for font name, and –q flag of the qprt command for print quality.
Page Width The –w flag controls the width of the printable page in characters. Plus Printer Default 2380 and 2390 80 2381 and 2391 136 OKI MICROLINE 801PS/+F, 801PSII/+F, 800PSIILT The Japanese PostScript and ASCII data streams are supported. Japanese language text files cannot be printed. All OKI MICROLINE series printers are connected by RS–232C cabling. Printronix P9012 Line Printer Only the Serial Matrix command set is supported. The P–series command set is not supported.
Printer Support Support for each printer is provided as a separately installable package. To see a list of printers for which support has already been installed on your machine, enter: smit lssprt To install support for additional printers, enter: smit printerinst If your printer is not supported, you can configure it as a supported printer that is functionally similar to your printer. Otherwise, you can configure your printer as a generic printer. To do this: 1.
• Bull PR–88 • Bull PR–88 VFU Handling • Bull PR–90 • Canon LASER SHOT LBP–B404PS/Lite • Canon LASER SHOT LBP–B406S/D/E/G, A404/E, A304E • Dataproducts LZR 2665 Laser Printer • Dataproducts BP2000 Line Printer • HP 2500C Color Printer • HP LaserJet II • HP LaserJet III • HP LaserJet IIISi • HP LaserJet 4, 4M • HP LaserJet 4Si, 4Plus, 4V, 4000 • HP LaserJet 5Si, 5Si MX • HP LaserJet 5Si Mopier • HP LaserJet Color • HP LaserJet 5000 D640 Printer • HP LaserJet 8000 Printer • HP LaserJet 8100 Printer • HP Color
• IBM 4076 InkJet Printer • IBM 4079 Color JetPrinter • IBM 4201 Model 2 Proprinter II • IBM 4201 Model 3 Proprinter III • IBM 4202 Model 2 Proprinter II XL • IBM 4202 Model 3 Proprinter III XL • IBM 4207 Model 2 Proprinter X24E • IBM 4208 Model 2 Proprinter XL24E • IBM 4208 Model 502 Proprinter XL24EK • IBM 4212 Proprinter 24P • IBM 4216 Model 510 • IBM 4216–510 • IBM 5327–011 • IBM 4224 Printer, Models 301, 302, 3C2, 3E3 • IBM 4226 Printer • IBM 4234 Dot Band printer Model 013 • IBM 5202 Quietwriter III •
• IBM 6182 Auto Feed Color Plotter • IBM 6184 Color Plotter • IBM 6185–1 Color Plotter • IBM 6185–2 Color Plotter • IBM 6186 Color Plotter • IBM 6252 Impactwriter • IBM 6252 Printer • IBM 7372 Color Plotter • Network Color Printer • IBM InfoPrint 20 • IBM InfoPrint 40 Printer • Lexmark Optra Laser Printer • Lexmark Optra Plus Laser Printer • Lexmark Optra Plus Laser Printer • Lexmark Optra C Color Laser Printer • Lexmark Optra E Laser Printer • Lexmark Optra E310 Laser Printer • Lexmark Optra M410 Laser Pri
• Canon LASER SHOT LBP–B404PS/Lite on page 4-74 • Canon LASER SHOT LBP–B406S/D/E/G, A404/E, A304E on page 4-74 • Dataproducts LZR 2665 Laser Printer on page 4-74 • Hewlett–Packard LaserJets II, III, IIISi, 4, 4Si, 4Plus, 4V, 4000, 5Si/5Si MX, 5Si Mopier, 8000 Color, and 8500 Color on page 4-74 • IBM Personal Printer II Models 2380, 2381, 2390, 2391, 2380–2, 2381–2, 2390–2, 2391–2 on page 4-56 • IBM 3812 Model 2 Page Printer on page 4-56 • IBM 3816 Page Printer on page 4-57 • IBM 4019 LaserPri
4-132 • OKI MICROLINE 801PS/+F, 801PSII/+F, 800PSIILT on page 4-126 • Printronix P9012 Line Printer on page 4-126 • QMS ColorScript 100 Model 20 Printer on page 4-126 • Texas Instruments OmniLaser 2115 Page Printer on page 4-55 Guide to Printers and Printing
Pass–Through Mode Both virtual printers and the printer device driver can operate, or function, either in pass–through mode or in non–pass–through mode. With Pass–through mode, a data stream is ”passed through” to the printer, byte by byte, unmodified. The mode of operation selected for a given job determines how or even if a data stream is processed. It is important to understand the difference between the two modes, when each mode is in effect, and if the mode can be changed.
This is a test version of /etc/motd, used to demonstrate what happens when a printer device driver, such as /dev/lp0, is placed into or taken out of passthru mode. Printers will print either exactly what they are sent, if you set the job conditions up correctly, or, on the most current printers, you may be able to direct the printer to perform certain mappings for you. There are no carriage returns in this file, and the only blank line occurs immediate before this one.
The _d attribute in a virtual printer definition (a digested colon file) specifies the input data stream type for the queue associated with that virtual printer. The virtual printer definition also specifies the formatter filter for that input data stream type. When the formatter filter is invoked to process a job, the process that runs the formatter (pioformat) filter checks the value of the _d attributes and decides whether to invoke the formatter filter in pass–through mode.
Viewing, Formatting, or Modifying Virtual Printer Definitions An IBM 4029 LaserPrinter supports four distinct data streams. The root user can use the mkvirprt command to create both a queue and a virtual printer definition for each of the four data stream types. The root user can further use the lsvirprt command to view and modify the colon file underlying the virtual printer definition.
Name __FLG _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _E _F _G _H _I _J _K _L _O _Q _S _U _V _W _X _Y _Z Description VALUES THAT MAY BE OVERRIDDEN WITH FLAGS ON THE COMMAND LINE (not used) (not used) (not used) (not used) (not used) (not used) (not used) (not used) (not used) (not used) stderr returned? 0: no; 1: yes, & pipelines; 2: yes, & values, pipelines Double–High Print.
Other attributes may be much harder to read in this form. For example, entering ia at the prompt and pressing Enter will result in output similar to the following being displayed: Name ia Description ASCII Value %Ide/pioformat –@% Idd/%Imm –!%Idf/pi of5202 –l%IwL –w%I wW %f[begijpqstuvx yzEGIJLOQWXZ] %Uh To LIST attributes, enter AttributeName1 ..
:056:__FLG:: :625:CB:S[B]DyEn: :626:CC:S[C]DyEn: :627:CD:S[D]DyEn: :628:CE:S[E]DyEn: :629:CF:S[F]DyEn: :630:CG:S[G]DyEn: :622:Ca:DyS[G500]I[1810532]EnR[pioattr1.
%Ide INCLUDE: (Directory Containing Miscellaneous Modules) ’/pioformat –@’ %Idd INCLUDE: (Directory Containing Digested Data Base Fil es) ’/’ %Imm INCLUDE: (File Name Of (Digested) Data Base; Init. By ”piodigest” (mt.md.mn.
Modifying the mi, mp, and _d Attributes on a PostScript Queue Input data stream attributes store the pipelines for different input data stream types. For more information, see Input Data Stream Attributes on page 4-7. The definition for a generic PostScript printer has four input data stream pipelines: ia (extended ASCII), in (troff), ip (passthru), and is (PostScript). The _d attribute in the colon file controls which of the four input data stream processing pipelines will, by default, be used.
How piobe Uses Printer Colon Files The piobe command is a spooler backend program called by the qdaemon program to process a print job. It has the ability to generate diagnostic output. A specific example of this diagnostic output is used in the following discussion to examine these points: • How piobe uses printer colon files. • How printer colon file escape sequences are evaluated to resolve path names. • How printer colon file escape sequences are evaluated to resolve page length.
The mail specifies several items: • The physical printer that would have been used. • The values of the flags that pertain to this spooler queue. • The pipeline of filters that would have been executed. The flags values used on the command line, a1, Pasc, fp, z1, p12, scourier, C, and N3, can be seen in the section of the mail labeled FLAG VALUES. Of more interest is the section of the mail labeled PIPELINE OF FILTERS.
• mn – Device name • mq – Queue name (name of a queue stanza in /etc/qconfig) • mv – Virtual printer name (name of a corresponding device stanza in /etc/qconfig) These file virtual printer attributes are initialized by the piodigest command at the time the queue and virtual printer are created. The combination of the five is unique in the virtual printer database. For this queue, the value of mt.md.mn.mq.mv is ibm4029.asc.lp1.asc.lp1.
Spooler Job Header and Trailer Pages The pipelines for generating header and trailer pages are defined by the system administation attributes ( System Administration Attributes on page 4-6) sh (header pages) and st (trailer pages). The printing of header and trailer pages are separate processes from the spooler print jobs they accompany, even though they are not shown in the output of queue status queries.
The value of the st definition is similar to the value of the sh definition. Custom Header Pages The root user can create custom header pages for users by modifying the definiton of the sh attribute. Because the spooler processes have access to the environment of the user that submitted the job to the spooler, the root user can modify the portion of the sh attribute definition that specifies which header page template to process. For example, the H.
Pipeline for Header Page sh = { if test X”$MYHEADER” = X ; then %Ide/pioburst %F[H] %Idb/H.
Modifying the mo Virtual Printer Attribute All virtual printer definitions contain an attribute named mo. The mo attribute specifies the command string to invoke the device driver interface program. The device driver interface program is the last process in the input data stream processing pipeline and, in the case of local spooler queues with piobe as the backend, is usually pioout.
system naming conventions. A reasonable action is to create a file just for the purpose of being the target of file queues. For example, the root user can issue the command touch /dev/lxx to create a file named lxx in the /dev directory. After you provide the name of a file in the /dev directory, choose a queue name for each input data stream supported by the printer type you selected earlier. In this example, suppose the name asc was chosen for an ASCII queue.
Filters Virtual printer definitions contain predefined and open (undefined) filter attributes. For example, an AIX Version 4 ASCII queue on an IBM 4029 LaserPrinter offers the following filter attributes: • f1, f2, f3, f4, and f5 – open, user–defined filters • fb – bidi filter for Hebrew/Arabic.
–P asc –o –f –o p /etc/motd These are the arguments qprt tried to pass to enq. You see them because qprt found echo instead of enq. The following command is equivalent to the command shown in step 2 above: enq –P asc –o –f –o p /etc/motd The –o option specifies that flags specific to the backend should be passed to the backend.
This frequently removes all the printer control problems that existed, but adds one new one. When the formatter filter operates in passthru mode, the mapping of linefeeds to carriage returns and linefeeds is disabled. The forms still do not print correctly. Suppose that the application does not allow the insertion of carriage returns into the data stream, you can fix this problem with a simple filter, as follows: #include
Editing the /etc/qconfig File The /etc/qconfig configuration file can be edited with your text editor of choice. There are unenforced rules concerning when you can and cannot edit the /etc/qconfig file without halting or otherwise corrupting the operation of the spooler. Modifying the /etc/qconfig File while Jobs are Processing The /etc/qconfig file should never be edited when jobs are processing.
4-154 Guide to Printers and Printing
Chapter 5. Troubleshooting the Base Operating System Spooler This chapter contains information on the following topics that help resolve printing problems.
Local Printer Checklist Check the following items if you are having problems with your local printer: • Verify that the qdaemon is running. Make sure there are no forked processes running from the qdaemon. • Make sure the system date is correct. The qdaemon automatically rebuilds the qconfig.bin file when the qconfig file changes. If the date on the qconfig file is earlier than the date on the qconfig.bin file, the qconfig file is not digested, even if it was just modified. • If the dates on the qconfig.
Inoperative Printer Checklist If you have inoperative printers, check the following items for locally attached printers that have never worked: • Run the test pattern for the printer with only the power cable attached to the printer. • Verify that you have the correct cable for the printer. • Make sure the cable is securely plugged in. • Verify that you have created a device for the printer (with Devices, SMIT, or at the command line).
Remote Printer Checklist Check the following items for the host acting as the remote print server: • Make sure that all client machines (foreign hosts) are listed in the /etc/hosts.lpd file. • Make sure that the TCP/IP subsystem is running. • Check for the existence of the /usr/spool/lpd directory. • Make sure that the /etc/locks/lpd directory does not exist if the lpd daemon is not running. • Make sure that both the lpd daemon and the qdaemon are running. • Check Local Printer Checklist on page 5-2.
Adapter Considerations The 16–port RS–232 adapter does not support clear to send (CTS). A printer connected to this adapter will not finish printing a job if the printer is powered off while the job is printing. You must restart the job or delete it manually. Resource Considerations Printing generates processes. Printing a job might take up anywhere from one to five processes in most instances. As with any other activity, it is possible to exhaust the number of processes on the system.
Printing Problems When the var File System is Full Printing problems occur when the /var file system is full. This usually happens when print jobs sent to the print queue begin to back up for some reason, causing the spooling directory within the file system to grow too large. The spooling directories usually affected are /var/spool/lpd and /var/spool/qdaemon.
Reactivating the Queue Daemon The queue daemon (or qdaemon) process tracks print job requests and the printers available to handle these requests. The qdaemon maintains queues of outstanding requests and, as devices become available, sends them to the proper device at the proper time. If the qdaemon stops functioning, you will experience printing problems and will then need to restart the qdaemon using the following procedure. Note: Some commands may require root user or system group authority. 1.
Clearing a Print Queue Backlog To clear the queuing system, you must stop qdaemon and check if the /var file system is full. If so, use the following procedure to clear the queue directories and restart the qdaemon. 1. Make sure you are logged in as root. 2. If possible, let all current print jobs finish printing or cancel them. To cancel a print job, issue the lpstat command to get the print job number.
rm * The pwd command writes to standard output the full path name of your current directory (from the root directory). The rm command removes the entries for the specified file or files from a directory. 10.Change the directory again: cd /var/spool/lpd/stat 11. Issue a pwd command to verify that you are in the proper directory. Then, remove all files in this directory: rm * 12.Change the directory again: cd /var/spool/qdaemon 13.Issue a pwd command to verify that you are in the proper directory.
Reallocating Printer Resources Use the following procedures to avoid having one print job use all of the printer resources. Note: Some commands may require root user or system group authority. 1. Determine if a print job is using all resources in one of two ways: – Use the following lpq command: lpq The lpq command, when entered without flags, reports the status of the default queue.
Deleting Unnecessary Directory Files Use the following procedures to clean out unnecessary files stored in the spooling directory. Note: Some commands require root user or system group authority. 1. Determine if there are unnecessary files stored in the spooling directory by entering the following du command: du –rs /var/spool The du command summarizes disk usage. The –s flag instructs the du command to display only the total disk usage of the /var/spool directory and the files it contains.
Terminal–Attached Printer Checklist Check the following items when the printer attached to an ASCII terminal does not produce output: • Verify that the AUX port on the terminal is configured with the same settings as your printer. To do this, consult your terminal documentation for information about setting values for the AUX port. Consult your printer documentation for information about configuring the printer’s serial interface.
Considerations for 8–Bit Printer Attached to 7–Bit Interface Some printers assume an 8–bit (8 bits per byte) interface to the host. Although an 8–bit printer may print when attached to a 7–bit interface, the printed output may not be acceptable. To determine if your printer assumes an 8–bit interface, consult your printer manual. Incorrect printed output can be produced in the following situations: • Printer command sequences may contain 8–bit values.
qdaemon Checklist Under normal circumstances, the qdaemon command starts when the system starts, runs until the system shuts down, and requires no attention from you. Sometimes, however, the qdaemon command may stop running or be unable to perform its function. The following article explains what you need to do under these conditions.
Queuing System Problems When the queuing system shows one or more queues in DEV_WAIT and you have verified that the queue is not waiting on the printer because the printer is offline, out of paper, jammed, or the cable is loose, bad, or wired incorrectly, and it has not changed to DOWN within the TIMEOUT period, use the following method to clear and restart the queuing system. This method stops the qdaemon, removes all queued jobs, and restarts the qdaemon. You must have root authority.
Testing the qdaemon Submitting jobs to the spooler causes no discernible spooler activity. Assume a local ASCII print queue named asc. Is the qdaemon running? Issue the command enq –Pasc /etc/motd. If the qdaemon is not active, a variant of the following message will be displayed: enq: (WARNING): Cannot awaken qdaemon. (request accepted anyway) enq: errno = 2: No such file or directory enq: (WARNING): Cannot awaken qdaemon.
they are out of paper, fix the problem and see if the printers begin printing. If they do not begin printing, again use the lpstat command to see if the queue status is RUNNING. In any of these circumstances, the purpose of checking the printers is to verify that at least one printer is actually printing even though the qdaemon is not starting new jobs. Now submit a new job to the spooler with the command enq –Pasc /etc/motd. Use the lpstat command to examine the queue status.
Testing a Spooler Queue When spooling jobs from an application, it is often not clear if a job is actually getting to the spooler. Again assume you are having problems with a queue named asc. Issue the command disable asc to disable the spooler queue. Issue the command lpstat –pasc to verify that the queue is DOWN. Now submit a job to the queue using the application.
Copying Spooled Jobs Particularly in a remote spooling environment, it can be useful to make a copy of a spooled print job. When a job is submitted to the spooler, a job description file (JDF) is created and stored in /var/spool/lpd/qdir. If the queue is a remote queue, with something like rembak as the backend, the job will be transferred to the print server, where enq will make another JDF and put the job onto the specified print server queue.
Cleaning Up and Starting Over This procedure completely clears and restarts the spooler system. All jobs currently queued for processing are deleted and must be resubmitted. Use it when you cannot troubleshoot an inoperative spooler. You must be the root user to perform this task. 1. Stop the qdaemon and associated processes: stopsrc –s qdaemon ps–ef | grep qd 2. kill –9 PIDNumbers where PIDNumbers are PIDs resulting from the ps command. You may find qdfork.
Chapter 6.
Understanding the Print Service The System V print service is a collection of utilities that help you, as system administrator (or printer administrator), to configure, monitor, and control the printers on your system.
You can customize the print service by adjusting or replacing some of the items shown in the Overview of Print Request Processing figure (the numbers in the following list correspond to the numbered items in the diagram). 1. Print service configuration: For most printers, you need only change the printer configuration stored on disk. See the lpadmin command for adding or modifying a local printer. 2.
run separately by the spooling daemon to avoid tying up a printer. Fast filters are run so their output goes directly to the printer; thus, they can exert control over the printer. Print Request Log Each time a user sends a job to the printer, the print service creates two files that describe the job request and places one each in the /usr/spool/lp/temp and /usr/spool/lp/requests directories.
P Priority of the print request, if applicable. p List of pages printed. r Any –r options given to the lp command indicating that the user requested raw processing of the file. S Character set used. s Outcome of the job, expressed as a combination of individual bits in hexadecimal form. The important bits used internally by the spooler are: • 0x0004 Slow filtering finished successfully. • 0x0010 Printing finished successfully. • 0x0040 Request was canceled.
Administrative Print Service Commands Command Description accept reject Permits jobs to be queued for a specified destination Prevents jobs from being queued for a specified destination cancel Cancels requests to a line printer enable disable Activates the named printers lpadmin Sets up or changes printer configurations lpc Provides (BSD) line printer control lpfilter Sets up or changes filter definitions lpforms Sets up or changes preprinted forms (use /usr/sbin/lpadmin to mount a form) lpm
Customizing Printer Configuration Although the print service is flexible enough to handle most printers and printing needs, you might require features that the standard print service does not accommodate.
/usr/sbin/lpadmin –p printer_name –o width= scaled–number /usr/sbin/lpadmin –p printer_name –o length= /usr/sbin/lpadmin –p printer_name –o cpi= scaled–number /usr/sbin/lpadmin –p printer_name –o lpi= scaled–number scaled–number Note: The lpadmin command uses the printer type to determine whether the settings are possible for the printer. Therefore, you must first set the printer type before you can specify these defaults.
remove the wildcard entry from the file and add entries for the remote systems. To do this, perform the following: • To remove the wildcard entry for BSD systems, use: /usr/sbin/lpsystem –r ”*” • To add the entry for a specific remote system, use: /usr/sbin/lpsystem system–name Printer Models File The printer models file /usr/lib/scoadmin/printer/model.stz contains a list of supported printers and their attributes. Web–based System Manager uses this file to configure a new printer.
Printer Interface Scripts A printer interface script is a program that the print service uses to manage the printer each time it prints a file. The interface script initializes the printer, takes advantage of its particular capabilities, prints the file, and reports any errors. Note: If you have an interface program that you have used with the print service of an older UNIX system, it should still work.
When the interface script is invoked: • Standard input comes from /dev/null. • Standard output is directed to the printer port. • Standard error output is directed to a file that will be displayed to the user who submitted the print request. The print service passes additional printer configuration information to the interface script as the following shell variables: TERM= printer–type Specifies the printer type.
## Print the banner page Some applications, when run with certain printers, may require that you turn off page breaking. If you must turn off page breaking, you can modify the standard interface program (/usr/lib/lp/model/standard) at this line: if [ –n ”${FF}” –a ”no” = ”${nofilebreak}” ] Change the no to yes to turn off page breaking. 5. Specify that the custom interface script print all user–related error messages to the standard output or to the standard error output.
Exit Codes The following table describes how the print service interprets exit codes: Code Description 0 The print job completed successfully. 1 to 127 The print service encountered a problem in printing the job (for example, there were too many nonprintable characters or the job exceeded the printer’s capabilities). This problem does not affect future print jobs. The print service should notify the person who submitted the print job – via write or mail – that an error occurred in printing the job.
pitch, and character sets, and you might have trouble keeping the printer set to the correct modes for each print request or using printer forms with the printer. In this case, you can either add an entry to terminfo ( Adding a Printer Entry to the terminfo Database on page 6-14) for your printer or create a customized interface program ( Creating Printer Interface Scripts on page 6-11) to use with the printer. You can define hundreds of items for each terminal or printer in the terminfo database.
* hpa Horizontal position absolute * cud1 Down one line * cuf1 Carriage right swidm Enable double–wide printing rwidm Disable double–wide printing * ff Page eject * is1 Printer initialization string * is2 Printer initialization string * is3 Printer initialization string * if Name of initialization file * iprog Path name of initializing program * cud Move carriage down # lines * cuf Move carriage right # columns * rep Repeat a character # times * vpa Absolute vertical position s
Page length: 66 Page width: 80 Number of pages: 2 Line pitch: 10 Character pitch: 16 Character set choice: Ribbon color: blue Comment: Check form Alignment pattern: any XXXX XXXXXXXXXXXXX XXXXXXXXX xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx The print service uses the alignment pattern to line up the forms before printing begins and prompts you to perform an alignment before printing. Depending on your printer, specify page length in lines, inches (i), or centimeters (c).
users who are included in a deny list on a remote system are included in the corresponding deny list on your local system. This ensures that whenever a user on your system requests a form without authorization, the user is immediately informed that permission to use the form is being denied. If the local print service does not know that a user is denied permission to use a particular remote form, there will be a delay before the user receives a permission denied message from the remote system.
Unmounting a Form The lpadmin command allows you to specify that a form or font on a specified printer is to be unmounted. To unmount a form, use the following command: /usr/sbin/lpadmin –p printer–name –M –f none Examining a Form After you have defined a form to the print service, you can examine it with one of two commands, depending on the type of information you want to check. The lpforms command displays the attributes of the form. (The display produced by the lpforms command can be used as input.
Providing Filters A filter is a program that you can use for the following purposes: • To convert a user file from one data format to another so that it can be printed correctly on a given printer • To handle the special modes of printing that users may request with the –y option to the lp command (such as two–sided printing, landscape printing, draft or letter–quality printing) • To detect printer faults and notify the print service of them, so that the print service can alert you Not every filter can perf
match output types to input types in this way, thus passing a file through a series of filters, until the file reaches a printer that accepts it. Example: HP DeskJet 500 In this example, the user Chris has run a spreadsheet program and has generated a file containing a copy of a spreadsheet. Chris now wants to print this file using the print service. You have only HP DeskJet 500 printers on your system.
signals other than the dropping of a carrier or the shutting off of data flow. A filter can serve you by detecting more faults and providing more information about them than you would otherwise receive. A filter can wait for a printer fault to clear and then resume printing. This service allows for more efficient printing when a fault occurs because the print request that was interrupted does not have to be reprinted in its entirety.
• Names of specific printers to which it will send jobs • Type of the filter (whether it is a fast filter or a slow filter) • Options See Adding a Filter to the Print Service on page 6-27 for more information.
file. Try to find a set of filters that take (as input types) all the different files your users may want printed and converts those files directly into types your printers can handle. • Printer types: A list of printer types into which the filter can convert files. For most filters, this list is identical to the list of output types.
replace any asterisks it contains with the pattern specified or expand any regular expressions it contains, and append the result to the command line.” The options specified in a filter definition may include none, all, or any subset of these 13 keywords. In addition, a single keyword may be defined more than once, if multiple definitions are required for a complete filter definition. See Using Templates to Defining Options on page 6-24.
Line pitch LPI Page length LENGTH scaled–decimal 66 Page width WIDTH scaled–decimal 80 Pages to print PAGES page–list 1–5,13–20 Character set CHARSE character–set T finnish Form name FORM form–name invoice2 Number of copies COPIES integer 3 Special modes MODES mode landscape scaled–decimal 6 To find out which values to supply for each type of template (that is, for the pattern and replacement arguments for each keyword), consider the following: • The values for the INPUT and OU
Example: col Filter Suppose you already added a filter called col with the following definition: Input types: Output types: Command: Options: Options: N37, Nlp, simple simple /usr/bin/col TERM 450 = –b, MODES expand = –x INPUT simple = –p –f Note: If you provide more than one definition (that is, more than one line) for any filter characteristic other than Options, only the last definition will be used by the print service.
This template is used to convert a MODES option of the form –y group=number into filter options –nnumber. So if a user gives the command lp –y group=4, the dpost command would include the option –n4. For additional examples, run the command /usr/sbin/lpfilter –f filter –l where filter is the name of the factory–installed PostScript filters. (For a list of PostScript filters, see PostScript Printers on page 6-31.
Printer Types The printer–type attribute is defined with the –T printer–type option of the lpadmin command. A printer type is the generic name for a printer. Typically it is derived from the manufacturer name. For example, the ACME\ Computer 356 Dot Matrix Printer might have the type 356. Assigning a type for each printer is important because the print software extracts information about printers from the terminfo database on the basis of type.
contains only one type: simple.) If you are adding a remote printer, list the content types that have been established for it by the administrator of the system on which it resides. The content–type–list is a list of names separated by commas or spaces. If you use spaces to separate the names, enclose the entire list (except for the –I) in quotes. Common Types Content type names might look like printer type names, but you are free to choose names that are meaningful to you and the people using the printer.
Default Content Type While it may be desirable to list content types for each printer, it is not always necessary. If you do not, the printer type is used as the name of the content type the printer can handle. If you have not specified a printer type, the print service assumes the printer can print only files of content type simple. This may be sufficient if you require users to specify the correct printer explicitly and if files are correctly prepared for the printer before being submitted for printing.
PostScript Printers PostScript is a general–purpose programming language that allows you to specify the appearance of both text and graphics on a page. A PostScript printer is equipped with a computer that runs an interpreter for processing PostScript language files. When a PostScript printer receives a file, it runs that file through the interpreter and then prints it.
tek4014 Print files formatted for a Tektronix 4014 device plot Print plot–formatted files Filters are provided with the print service to translate print requests with these formats to the PostScript language. For example, to convert a file containing ASCII text to PostScript code, the filter takes that text and writes a program around it, specifying printing parameters such as fonts and the layout of the text on a page.
which controls the orientation of the logical page rather than the physical page, would cause the logical pages to be positioned one on top of the other when combined with the group=2 option. Supporting PostScript Printers Support of PostScript printers is similar to support of other printers, in that the printers must be defined to the system with the lpadmin command and the appropriate software must be installed to manage them.
/usr/sbin/lpadmin –p ps1 –T PS–b –I PS As part of the installation procedure, you may want to install fonts on the printer or downloadable fonts on the computer. See Installing and Maintaining PostScript Fonts on page 6-34 for details. Installing and Maintaining PostScript Filters The PostScript filters provided cover the majority of situations. In certain circumstances, however, you may find it helpful to change the filter descriptions and install the filters differently.
PostScript printers are shipped with 35 standard fonts, although less expensive models have only 13. • A font may be permanently downloaded by being transmitted to a printer using a special PostScript programming technique using the exitserver operator. A font downloaded in this way will remain in the printer memory until the printer is turned off. Memory allocated to this font will reduce the memory available for PostScript print requests.
printer startup %%[ status: waiting; source: serial 25 ]%% %%[ status: endofjob ]%% %%[ status: idle ]%% sending file romfonts.ps waiting for end of job %%[ status: busy; source: serial 25 ]%% /AGaramond–Bold /AGaramond–BoldItalic /AGaramond–Italic /AGaramond–Regular /AvantGarde–Book /AvantGarde–BookOblique /AvantGarde–Demi /AvantGarde–DemiOblique . . . more PostScript font names . . .
1. Copy the font file to the appropriate directory. The fonts available for use with PostScript printers reside in the /usr/share/lib/hostfontdir directory or other directories. 2. Add to the map table the name of the font and the name of the file in which it resides.
Font Cartridges and Character Sets Printers differ in the way they print different font styles. Some have font cartridges, while others have preprogrammed, selectable character sets.The print service can minimize the impact of these differences on the users of the print service. You can specify which font cartridge or character set is available with each printer. When you list the font cartridges or character sets available, you assign names to them.
character set 2, but better names are needed for the standard set (set 0) and set 1. Enter the following command to define synonyms: /usr/sbin/lpadmin –p printer_name –S ”cs0=american, english=british” • The following three commands will then produce identical results. (The lp command routes print jobs to the printer, and in these examples, routes the print job to any printer capable of handling the cs1 character set.) lp –S cs1 –d any . . . lp –S english –d any . . . lp –S british –d any . . .
Any print requests that require a font cartridge are printed on printer_name. 5. Re–enable the printer. To unmount a font cartridge, enter: /usr/sbin/lpadmin –p printer_name –M –S none Note: You do not need to unmount the current font cartridge after physically removing it from the printer before installing and mounting a new font cartridge. Setting Up Printer Fault Alerts The print service provides a method for detecting and alerting you to printer faults.
Specifying a Printer Fault Recovery Mechanism Note: This information does not apply if you are making a remote printer accessible to users on your system.
For example, to direct the print service to send electronic mail alerts every five minutes whenever the printer queue contains two or more requests for the check form and it is not already mounted, enter: lpforms –f check –A mail –Q 2 –W 5 To arrange for alerting to the need to mount a font cartridge, enter: lpadmin –S minutes font_cartridge_name –A alert_method –Q number –W For example, to direct the print service to write alerts to your terminal every two minutes whenever the printer queue contain
opost Postprocess data stream as listed below: –olcuc Do not map lower case to upper case onlcr Map linefeed into carriage return/linefeed –ocrnl Do not map carriage return into linefeed –onocr Output carriage returns even at column 0 nl0 No delay after linefeeds cr0 No delay after carriage returns tab0 No delay after tabs bs0 No delay after backspaces vt0 No delay after vertical tabs ff0 No delay after form feeds You may find that the default characteristics are sufficient for your pr
3. Create the file /usr/spool/lp/remote and add the following lines: port: lp –dreal –oportrait land: lp –dreal –olandscape This specifies that when printing to printer land, the print system sends the print job to printer real using the –olandscape option (to print in landscape mode) and when printing to printer port, the print system sends the print job to printer real using the –oportrait option (to print in portrait mode). Note: The options listed after –dreal depend on the printer model.
used by the subsystems to manage the AIX system. Other subsystems that use the LDAP directory include Security and Network Information Services (NIS). Prerequisites • AIX 5.2 or later • IBM Directory Server and Client v4.1 or later Note: IBM Directory is provided with the AIX base operating system media. Planning to Set Up the Print Subsystem Setting up the print subsystem to use Directory (LDAP) involves two steps. First, configure a Directory (LDAP) server to store System V print information.
instance name, and creates a DB2 database with ldapdb2 as the default database name if one does not exist. If an existing database is found, the mkprtldap command adds AIX System V print information to the existing database. 2. Requires the Directory Administrator Distinguished Name (DN) and password if the directory has been previously configured. If the directory administrator DN and password have not been set, the mkprtldap command sets them to the values provided to the command. 3.
for System V print information and cn=aixsecdb for User/Group information) under it. System V print information is stored under the ou=print object. The ou=print object has three objects under it for printer, print queue and system information. Printer definitions are stored under the ou=printer object. Print Queue definitions are stored under the ou=print queue object while System information can be found under the ou=system object.The entire print tree is ACL–protected below the ou=print object.
• Saves the ACL Bind Password for the AIX Print Bind DN in the /etc/ldapsvc/system.print file. The value of the ACL Bind password must be the same as the one specified during the configuration of the Directory server. • Undoes a previous client configuration if the –U flag is specified. This option replaces the /etc/ldapsvc/system.print and /etc/ldapsvc/server.print files with the previous saved copies of the /etc/ldapsvc/server.print.save and /etc/ldapsvc/system.print.save files.
–s –w Indicates the command is being run to configure the directory for System V print. ACLBindPassw Specifies the password to ACL–protect the print subtree on the d directory. Client–Side Options Flag Parameter –c Description Indicates the command is being run to configure clients to use the directory for System V print information. –d PrintBindDN Specifies the print bind DN. The default print bind DN is ou=print,cn=aixdata.
information. There could be situations in which the directory may contain an existing AIX information tree with Security or NIS information. It may be necessary to store the print information in a separate location on the directory under a different AIX information tree. By default,the mkprtldap command does not create an AIX information tree if one exists on the directory. To force the mkprtldap command to create an AIX information tree to store the print information,use the –f flag.
Chapter 7. Transparent Printing Most terminals have an auxiliary port that can be connected to a serial printer. These terminals support two print modes, Auxiliary and Transparent. If both print modes are OFF, data received by the terminal is simply displayed on the screen. With Auxiliary print mode ON, data received by the terminal is displayed on the screen and is also transmitted to the printer.
7-2 Guide to Printers and Printing
Chapter 8. Configuring a printer or plotter connected to a RAN This procedure allows you to define and configure a printer or plotter attached to a 128–port asynchronous adapter RAN. Prerequisites 1. You must have root user authority. 2. A 128–port asynchronous adapter must be installed, defined, and available. 3. At least one RAN must be connected. 4. Set the RAN’s node ID.
8-2 Guide to Printers and Printing
Chapter 9. Configuring Terminal–Attached Printers Many of the ASCII terminals used today have an auxiliary serial or parallel port on which to connect a printer device. Connections of this type offer administrators a means of sharing valuable computer resources and increasing user productivity and efficiency by moving the printers as close as possible to the users. This section describes the steps necessary to configure this type of terminal–attached printer in this operating system environment.
Adding the Print Queue At this point, you have physically attached the printer to the terminal and configured its auxiliary port with the correct printer settings. The following procedures describe the creation of a local print queue on the host that will access the terminal–attached printer device. 1. Log on as root or as a member of the printq admin group. 2. Use the smit mkpq fast path to access the Add a Print Queue menu.
Appendix A. Calculating Page Length Using Printer Colon File Escape Sequences The printer colon file for an ASCII queue on an IBM 4029 LaserPrinter defines page length, in lines, with the work attribute wL. Obtaining a numeric value for wL involves evalutating embedded references in the definition of wL.
The next %t finds a 1 on the stack and so the then clause, %GwJ, is resolved before any more work is done on resolving _l.
%G_Q %Pq %? %t %e %; %d PUSH: (PAPER SIZE override for input paper source) POP –> Internal Variable q %GWu PUSH: (Calculate value for paper source based on _ O and _u.
The calculation of wJ begins by pushing the value of _Q, the paper size override for the input paper source, onto the stack. The value of _Q is defined as %IwQ. As formatted by the lsvirprt command, wQ is defined as follows: Paper or Envelope Size For the Paper Source Selected By the –O and –u Flag Values (Refer to the s0, s1, s2, s3, and s4 attributes) wQ = %?%GWu%{0}%=%t%Gs0%e%GWu%{1}%=%t%Gs1%e%GWu%{2}%=%t%Gs2%e%GWu%{3}% =%t%Gs3%e%Gs4%;%d %? %GWu _O and _u.) %{0} %= %t %Gs0 %e %GWu _O and _u.
%? PUSH: (1 If –O Flag on Command Line; Otherwise 0) %t %? %G_O PUSH: (Type of INPUT PAPER HANDLING (backward compatibility purpose only)) %{1} PUSH: (Integer Constant 1) %= PUSH: (pop2 = pop1 ?) %t %? %Cu PUSH: (1 If –u Flag on Command Line; Otherwise 0) %t %? %G_u PUSH: (Input PAPER SOURCE) %{2} PUSH: (Integer Constant 2) %> PUSH: (pop2 > pop1 ?) %t %{4} PUSH: (Integer Constant 4) %e %{0} PUSH: (Integer Constant 0) %; %e %{0} PUSH: (Inte
The %gq fetches the stored value of _Q from the internal variable q, and pushes it onto the stack. The %{1} pushes another 1 onto the stack. The %= pops the top two values (two 1 s) off the stack and, checking them for equality, succeeds; a 1 is pushed onto the stack. The %t finds the 1 and so evaluates the %{2400}, which pushes 2400 onto the stack. The calculation of wJ then falls through all but the last line of the remaining printer colon file escape sequences defining wJ.
5. %& – Pops the top two values (two 1 s) off the stack, performs a bitwise AND on the two values, and pushes the resultant 1 onto the stack. 6. %t – Pops the 1 off the stack and, because it is a TRUE (non–zero) value, calls for the evaluation of %GwJ. The stack labeled _ l is now empty. 7. %GwJ – Calls for the evaluation of wJ. 8. %G_Q – Calls for the evaluation of wQ. 9. %GwQ – Calls for the evaluation of %GWu. 10.%GWu – Calls for the evaluation of Wu. 11.
34.%d – Pops the 2400 off the stack and returns it, in ASCII format, to the in–porgress calculation of _l. 35.%G_v – Pushes a 6 onto the stack. 36.%* – Pops the 6 and the 2400 off the stack, multiplies them together, and pushes the resultant 14400 onto the stack. 37.%{300} – Pushes a 300 onto the stack. 38.%/ – Pops the 300 and the 14400 off the stack, divides 14400 by 300, and pushes the resultant 48 onto the stack. 39.
The escape sequences defining Wu say this: • Case 1: If the O flag was not used on the command line, then return the colon file default value for _u. For example, if the user did not specify a type of input paper handling, then return the input paper source (either from the command line or the default from the colon file) to the evaluation of %IwQ. • Case 2: If the O flag was used on the command line but its value was not 1, then return the colon file’s default value for _u.
u value of 3 will direct the process into the else piece of the outer if–then–else statement, and the Q value of 3 will select an envelope page length of 1087 pels. Case 2: Same as case 1. Case 3: The user–specified manual paper handling on the command line but did not specify a paper source so Wu is assigned the value 0, and that value is returned to the evaluation of wQ. The 0 will cause wQ to be assigned the value of s0 (the paper size for manual paper feed, a 1).
Appendix B. Calculating Page Width Using Printer Colon File Escape Sequences The printer colon file for an ASCII queue on an IBM 4029 LaserPrinter defines page width, in characters, with the work attribute wW.
%? PUSH: (Page ORIENTATION) PUSH: (Integer Constant 1) PUSH: (pop2 & pop1) –– Bitwise AND %t %GwK PUSH: (Primary Page Length (–z 0) or Secondary Page Width (–z 1), in pels) %e %GwJ PUSH: (Primary Page Width (–z 0) or Secondary Page Length (–z 1), in pels) %; %? %G_p PUSH: (PITCH (characters per inch)) %{17} PUSH: (Integer Constant 17) %= PUSH: (pop2 = pop1 ?) %t %{171} PUSH: (Integer Constant 171) %e %G_p PUSH: (PITCH (characters per inch)) %{10} PUSH: (Integer C
%G_Q %Pq %? PUSH: (PAPER SIZE override for input paper source) POP –> Internal Variable q PUSH: (Calculate value for paper source based on %GWu _O and _u.
The calculation of wK begins by pushing the value of _Q, the paper size override for the input paper source, onto the stack. The value of _Q is defined as %IwQ. At this point in the calculation of Wk, we are exactly where we were in the calculation of wJ, that is, trying to determine a value for wQ and Wu. Within the context of a single job submission command, the final values of wQ and Wu are not going to change just because a final value was requested from a different attribute calculation.
numbered steps correspond to the numbers on the left side of the columns in the figure, and provide a step–by–step description of the evaluation of the printer colon file escape sequences defining page width, in characters, for this particular queue (asc), colon file, and command line. Figure 7. Calculation of Page Width 1. %Cw – Pushes a 0 onto the stack because the w flag was not used on the command line. 2. %I_w – Calls for the evaluation of _w. 3. %G_z – Pushes a 1 onto the stack. 4.
17.%t – Pops the 0 off the stack and, because it is a FALSE (zero) value, calls for the evaluation of %GWu. 18.%GWu – This value is already known, so a 1 is pushed onto the stack. 19.%{1} – Pushes a 1 onto the stack. 20.%= – Pops the two 1 s off the stack, compares them for equality, and pushes the resultant 1 onto the stack. 21.%t – Pops the 1 off the stack and, because it is a TRUE (non–zero) values, calls for the evaluation of %Gs1. 22.%Gs1 – Pushes a 1 onto the stack. 23.
47.%d – Pops the 128 off the stack and returns it, in ASCII format, to the in–progress calculation of ia, the input data stream pipeline for ASCII jobs. Why the Stack Language Describing Page Width Works The LaserPrinter 4029 Series technical reference contains a figure and a table that together describe the printable and unprintable areas on a page, and the paper and envelope dimensions, in pels, for standard paper and envelope sizes. For example, the printable area on an 8.
• Case 3: If the O flag was used on the command line and its value was 1, and the u flag was not used on the command line, then return a 0. For example, if the user–specified manual paper handling but did not specify an input paper source, then return a 0 to the evaluation of %IwQ. • Case 4: If the O flag was used on the command line and its value was 1, and the u flag was used on the command line and its value was not greater than 2, then return a 0.
returned to the evaluation of wQ. The 4 will cause wQ to be assigned the value of s4 (the envelope size for manual envelope size, a 3). When the evaluation of wK is resumed, the u value of 4 will direct the process into the else piece of the outer if–then–else statement, and the Q value of 3 will select an envelope width of 2498 pels. • Our example is case 1: neither the O nor the u flags were used on the command line, so Wu is assigned a value of 1, the default _u value for this colon file.
B-10 Guide to Printers and Printing
Index Symbols /etc/qconfig file structure, 3-16 Numbers 5080 Attachment Adapter, 2-10 A adapter, transparent printing, 7-1 ASCII terminal, configuring a printer for, 2-23 ASCII to PostScript automating conversion, 1-19, 1-21 converting files, 1-19, 1-21 printing, 1-19 attachment files, 4-42 print jobs, 1-11 processing, 3-11 routines libqb, 4-34 C Canon LASER SHOT printer, 4-74 checking, status of print jobs, 1-15 chmod command, 5-11 chpq command, 1-21 chvirprt command, 1-3 code sets, multibyte, 4-39 colo
I IBM printers, 4-56 iconv subroutine, 4-39 L LDAP configure server, 6-44 configure storage, 6-44 Lexmark 4227 Forms Printer, 4-77 Lexmark Optra C Color laserprinter, 4-94 Lexmark Optra E Laser Printer, 4-97 Lexmark Optra laserprinter, 4-78 Lexmark Optra N Laser Printer, 4-100 Lexmark Optra Plus laserprinter, 4-81 Lexmark Plus Printers, 4-124 libqb, backend routines, 4-34 local printers, definition, 1-2 lp command, 1-3 lpd daemon, 2-49 subsystem, 2-55 lpq command, 5-10 lpr command, 1-3 lprm command, 5-10 l
qdaemon problems, 5-14 queuing system, 5-15 remote printer checklist, 5-4 terminal–attached printer checklist, 5-12 printer/plotter device, definition, 1-4 printers formatter filter, 1-2 local, 1-2 moving to another port, 2-42 port, moving printer, 2-42 real, 1-5 remote, 1-5 serial, 1-5 status conditions, 1-16 terminal–attached adding a print queue, 9-2 configuring for the 128–port, 9-1 configuring the auxiliary port, 9-1 testing, 9-2 virtual, 1-5 printing administration, 2-1 ASCII files on a PostScript pri
releasing a print job, 1-14 starting a print job, 1-10 smit mount command, 5-11 split command, 5-10 spooler, 3-1 configuration file, etc/qconfig file structure, 3-16 data flow, 3-8 parts, 3-7 queues, 3-17 terminology, 3-3 spoolers, definition, 1-2 spooling directory mounting more space, 5-11 setting permissions, 5-11 working with files, 5-11 starting, print jobs, 1-6 startsrc command, 5-7 status conditions, of printers, 1-16 summaries, for printing, 1-23 T terminal–attached printer, checklist, 5-12 termina
Vos remarques sur ce document / Technical publication remark form Titre / Title : Bull AIX 5L Guide to Printers and Printing Nº Reférence / Reference Nº : 86 A2 58EM 00 Daté / Dated : July 2004 ERREURS DETECTEES / ERRORS IN PUBLICATION AMELIORATIONS SUGGEREES / SUGGESTIONS FOR IMPROVEMENT TO PUBLICATION Vos remarques et suggestions seront examinées attentivement. Si vous désirez une réponse écrite, veuillez indiquer ci-après votre adresse postale complète.
Technical Publications Ordering Form Bon de Commande de Documents Techniques To order additional publications, please fill up a copy of this form and send it via mail to: Pour commander des documents techniques, remplissez une copie de ce formulaire et envoyez-la à : BULL CEDOC ATTN / Mr. L. CHERUBIN 357 AVENUE PATTON B.P.20845 49008 ANGERS CEDEX 01 FRANCE Phone / Téléphone : FAX / Télécopie E–Mail / Courrier Electronique : +33 (0) 2 41 73 63 96 +33 (0) 2 41 73 60 19 srv.Cedoc@franp.bull.
BULL CEDOC 357 AVENUE PATTON B.P.
Utiliser les marques de découpe pour obtenir les étiquettes. Use the cut marks to get the labels.