Bull Guide to Printers and Printing AIX ORDER REFERENCE 86 A2 37JX 02
Bull Guide to Printers and Printing AIX Software November 1999 BULL ELECTRONICS ANGERS CEDOC 34 Rue du Nid de Pie – BP 428 49004 ANGERS CEDEX 01 FRANCE ORDER REFERENCE 86 A2 37JX 02
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, 1999 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.
Contents About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Chapter 1. Printers, Print Jobs, and Queues Overview for Users . . . . . . . . . . . Printer Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting a Print Job (qprt Command) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Canceling a Print Job (qcan Command) . . .
iv Holding and Releasing a Print Job (qhld Command) . . . . . . . . . . . . . . . . . . . . . . . . . . Moving a Job between Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scheduling Print Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing or Showing Queue Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Paper Size . . . . . . . . . . . . . . . . . . .
Printer Code Page Translation Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage–1 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage–2 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Printer Code Page Translation for Multibyte Code Sets . . . . . . . . . . . . . . . . . . . . .
Canon LASER SHOT LBP–B406S/D/E/G, A404/E, A304E . . . . . . . . . . . . . . . . . . Dataproducts LZR 2665 Laser Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hewlett–Packard LaserJets II, III, IIISi, 4, 4Si, 4Plus, 4V, 4000, 5Si/5Si MX, 5Si Mopier, 8000 Color, and 8500 Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lexmark 4227 Forms Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 5. Troubleshooting the AIX Spooler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Local Printer Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inoperative Printer Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote Printer Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Considerations . . . . . .
viii Guide to Printers and Printing
About This Book This book contains information for understanding the print process as well as providing printer configurations. Note: You can also view the information in this book with a Version 3.2 HTML–compatible web browser. Who Should Use This Book This book is for system administrators and programmers to help you resolve print–related problems. Before you read this book, you should know basic operating system commands.
ISO 9000 ISO 9000 registered quality systems were used in the development and manufacturing of this product. Related Publications The following publications contain information on managing your system, the commands and files used in the operating system. Order Number Bibliography 86 A2 71WE AIX and Related Products Documentation Overview 86 A2 99HX AIX 4.
Chapter 1. Printers, Print Jobs, and Queues Overview for Users 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. To handle print jobs with maximum efficiency, the system places each job into a queue to await printer availability.
Printer Terminology The following defines terms commonly used with printing. Print Job A print job is a unit of work to be run on a printer. A print job can consist of printing one or more files, depending on how the print job is requested. The system assigns a unique job number to each job it runs. Queue The queue is where you direct a print job. It is a stanza in the /etc/qconfig file whose name is the name of the queue and points to the associated queue device.
Real Printer A real printer is 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, but it is not aware of the concept of virtual printers. Local and Remote Printers When you attach a printer to a node or host, the printer is referred to as a local printer.
Starting a Print Job (qprt Command) Use the qprt, or smit commands 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 • F
Some useful qprt command flags are: –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.
For example, to request the myfile file to be printed on the first available printer configured for the default print queue using default values, type: qprt myfile For example, to request the file somefile to be printed on a specific queue using specific flag values and to validate the flag values at the time of print job submission, type: qprt –f p –e + –Pfastest –# v somefile This passes the somefile file through the pr filter command (the –f p flag) and prints it using emphasized mode (the –e + flag) o
Canceling a Print Job (qcan Command) You can cancel any job in the print queue with the Web-based System Manager fast path or the qcan or smit commands. 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.
Prioritizing a Print Job (qpri Command) You can change the priority of a job with the Web-based System Manager fast path or the qpri or smit commands. 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.
Moving a Print Job to Another Print Queue (qmov Command) After you have sent a print job to a print queue, you may want to move the print job to another print queue. You can move it with the Web-based System Manager fast path or with the qmov or smit commands. Note: You cannot move a remote print job to another print queue. Prerequisite The printer must be physically attached to your system.
Holding and Releasing a Print Job (qhld Command) After you have sent a print job to a print queue, you can put the print job on hold with the Web-based System Manager fast path or with the qhld or smit commands. 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.
Checking Print Job Status (qchk Command) You can display the current status information for specified job numbers, queues, printers, or users with the Web-based System Manager fast path or with the qchk or smit commands. 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.
DEV_BUSY Indicates that: • More than one queue is defined to a printer device (lp0) and another queue is currently using the printer device. • qdaemon attempted to use the printer port device (lp0), but another application is currently using that printer device To recover from a DEV_BUSY, wait until the queue or application has released the printer device or cancel the job or process that is using the printer port.
Formatting Files for Printing (pr Command) The pr command performs simple formatting of the files you sent 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 prints prog.c with the title MAIN PROGRAM in place of the file name. The modification date and page number are still printed. For example, to print a file named word.lst in multiple columns, enter: pr –3 word.lst | qprt This prints the word.lst file in three vertical columns. For example, to print several files side by side on the paper: pr –m –h ”Members and Visitors” member.lst visitor.lst | qprt This prints member.lst and visitor.lst side by side with the title Members and Visitors.
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.
There are several flags that may be specified with the qprt command to customize the output when submitting ASCII files to a PostScript print queue. –1+ Adds page headings. –2+ Formats the output in two columns. –3+ Prints the page headings, dates, and page numbers in a fancy style. This is sometimes referred to as ”gaudy” mode. –4+ Prints the file, even if it contains unprintable characters. –5+ Lists characters that are not included in a font.
Command Summary for Printers, Print Jobs, and Queues 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.
Chapter 2. Printers, Print Jobs, and Queues for System Administrators The printer subsystem includes a spooler, real printers, virtual printers, backends, and queues. A print job can be sent to a printer attached directly to a local system, or it can be sent over a network to a remote system and printed on a printer attached to the remote system.
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. However, if the printer cannot be configured from the application program, you must use a system editor to insert printer control codes.
The main 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. A print request issued by one of these commands is passed to the enq program that places the information about the file in the queue for the qdaemon to process. The queue is the /var/spool/lpd/qdir directory.
• Receives from the qdaemon command a list of one or more files to be printed. • Uses printer and formatting attribute values from the database, overridden by any flags specified. • Initializes the printer before printing a file. • Provides filters for simple formatting of ASCII documents. • Uses filters to convert the print data stream to a format supported by the printer. • Provides support for printing national language characters. • Passes the filtered print data stream to the printer device driver.
The formatter filter is made up of two components: • A device–independent formatter driver • A device–dependent formatter 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.
Queue Device The queue device is the line or list of items in the /etc/qconfig file that normally follows the local queue. It specifies the /dev file (printer device) to print to and the backend to use. Following is a sample listing: lp0: file = /dev/lp0 header = never trailer = never access = both backend = /usr/lib/lpd/piobe There can be more than one queue device associated with a single queue.
Initial Printer Configuration You can use one process to configure a printer and another to add a print queue. There are several different articles that describe how to do this. 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.
wsm printers In the Web-based System Manager Print Queues container, use the menus to complete the steps to configure a printer device and one or more print queues. You can also perform this step with the SMIT fast path smit mkpq. Note: If the printer supports more than one type of print data, such as PostScript and ASCII, enter a print queue name for each print data type. Note: Before choosing a 7–bit interface, see ”Considerations for 8–Bit Printer Attached to 7–Bit Interface”, on page 5-7. 3.
Procedure 1. At the system prompt, type: wsm printers In the Web-based System Manager Print Queues container, use the menus to complete the steps to add a print queue for a printer connected to an Xstation. You can also perform this step with the SMIT fast path smit mkpq. Note: If a printer supports more than one printer language such as PostScript and PCL, each supported language is listed. Enter a queue name for each printer language for which you want to add a print queue.
Note: If the printer supports more than one type of print data, such as PostScript and ASCII, enter a print queue name for each print data type. 2. After the print queues are successfully created, their names are displayed. Be sure to note any error messages before you exit. 3. Type wsm printers. Use the Print Queues menus to customize the new print queue. To use the SMIT fast path, type smit chpq.
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, refer to ”Initial Printer Configuration”, on page 2-7. Prerequisites The printer or plotter must be physically attached to your system to configure the printer port. smit Command 1. At the system prompt, type: smit pdp 2. Select Add a Printer/Plotter. 3.
Additional Queue Operations This section describes the following procedures: • Adding a Print Queue Device, on page 2-13 • Adding Plotter Support with 5080, on page 2-14 • Creating a Plotter Setup File, on page 2-15 • Adding a Local Printer to an Existing Queue, on page 2-16 • Adding an Xstation Printer to an Existing Queue, on page 2-17 • Adding an ASCII Terminal Printer to an Existing Queue, on page 2-18 • Adding an HP JetDirect Printer to an Existing Queue, on page 2-19 • Adding a File to an Existing Que
Adding a Print Queue Device Prerequisites To perform this task, you must have root authority. Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, use the menus to select or type 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. Provide additional information as prompted.
Adding Plotter Support with 5080 Prerequisites • The plotter must be physically attached to your system. • The plotter device must have already been added. Procedure 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, type: smit pq_mklque 2. At the NAME of Queue to Add prompt, type: plta to define serial porta. 3. At the NAME of Device to Add prompt, type: plota to define serial port a: 4.
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 Prerequisites To perform this task, you must be one of the following: • Root • A member of the printq group Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, use the menus to select the local attachment type, manufacturer, and printer model. 3. Provide additional information as prompted. You can also perform this task with the SMIT fast path smit mkpqprt.
Adding an Xstation Printer to an Existing Queue Prerequisites To perform this task, you must be one of the following: • Root • A member of the printq group Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, use the menus to select the xstation attachment type, manufacturer, and printer model. 3. Provide additional information as prompted. You can also perform this task with the smit mkpqprt command.
Adding an ASCII Terminal Printer to an Existing Queue Prerequisites To perform this task, you must be one of the following: • Root • A member of the printq group Procedure 1. At the system prompt, type: 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 Prerequisites To perform this task, you must be one of the following: • Root • A member of the printq group Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, use the menus to select the hpJetDirect attachment type, manufacturer, and printer model. 3. Provide additional information as prompted. You can also perform this task with the smit mkpqprt fast path command.
Adding a File to an Existing Queue Prerequisites To perform this task, you must be one of the following: • root • A member of the printq group Procedure 1. At the system prompt, type: smit mkpqprt 2. Select the file attachment type, manufacturer, and model. 3. Type the Name of existing FILE in the /dev directory. This is the file where you want print job output to be stored. The file must already exist and be located in the /dev directory. 4. Provide additional information as prompted.
Configuring Nonsupported Printers A nonsupported printer is a device that is not supplied with the operating system. Configuration Options Choose one of the following methods to configure and drive a nonsupported printer: • Configure the device as a supported printer if the nonsupported printer uses the same hardware interface (serial or parallel) and closely approximates the functions of a supported printer.
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. Provides host status to printer. Not used for data pacing. CTS <–– Must be high for printer port to be opened. Used to detect that the printer is turned on. DSR Not used. Usually tied to DCD. SG Reference voltage for signals. DCD <–– Used for data pacing when DTR is set to yes.
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 4039 Plus LaserPrinter – Lexmark 4079 Color JetPrinter Plus – Lexmark 4227 Forms Printer • Asynchronous Communications Adapters – Native serial port controller – 8–port controller – 16–port controller – 64–port controller – 128–port controller – Third–party controller Note: Third–party asynchronous controllers are also supported.
You can also perform this task with the SMIT fastpath smit tty . Verifying Terminal Output After you have configured the terminal device, enter the following to verify that the terminal is working and send output directly to the terminal screen: cat /etc/qconfig > /dev/ttynn where nn is the appropriate tty device number. The contents of the /etc/qconfig file should appear on the terminal screen. Installing the Physical Printer 1.
Commands and Control Sequences Terminfo Database The terminfo database contains the capabilities and special features of a terminal device, such as cursor positioning, initialization sequences, and key sequences that control specific terminal operations. For supporte d terminals, the control sequence values are predefined in the terminfo database. The control sequences that allow access to the AUX port are: mc5=Value Instructs the terminal to send all data to the AUX port (Printer ON).
y1 Indicates the maximum number of characters in a data block. y2 Indicates the number of microseconds to delay between data block transmissions. 64–Port Controller The 64–port controller provides hardware support for terminal–attached printers. The 64–port controller has the following virtual printer attribute: y1 Sets the priority with which printing will be done over terminal activity. The larger the number, the greater the priority the printer has over the terminal.
Terminal–Attached Printing Limitations 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.
Configuring a Printer for an ASCII Display Terminal Prerequisites • You must have connected a serial printer to the AUX or PRINT port on your ASCII terminal. Refer to the terminal documentation for cabling instructions. • The tty device for the ASCII terminal must be defined. See ”Adding or changing a TTY from the command line” in AIX 4.3 System Management Guide: Communications and Networks for more information. • The printer must be online.
Listing Print Queues and Print Queue Devices The following procedures apply to both local and remote print queues and 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. Listing Print Queues 1. At the system prompt, type: wsm printers 2.
Showing Status of Print Queues Use the Web-based System Manager to perform this task. Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Printers container, choose the Queue Status icon. From the Selected menu choose Properties. Select the ”General” tab within the ”Printer Properties” dialog. Information pertaining to status of print queues will appear in the ”Print Queue Properties” dialog. 3.
Starting and Stopping a Print Queue Prerequisites To perform these tasks, you must have root authority. Starting a Queue 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, 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. You can also perform this task with the following commands: smit qstart OR qadm –U QueueName Stopping a Queue 1.
Setting the Default Print Queue Prerequisites To perform this task, you must be one of the following: • root • A member of the printq group Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, 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 a Print Job (qhld Command) Prerequisites To hold or release a print job, you must be one of the following: • Print job owner • root • A member of the printq group Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, use the menus to complete the steps to hold a print job or to release a print job currently on hold.
Moving a Job between Queues Prerequisites To perform this task, you must be one of the following: • The print job owner • root • A member of the printq group. Procedure 1. At the system prompt, type: wsm printers 2. In the Web-based System Manager Print Queues container, 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. Listing All Scheduled Print Jobs At the prompt, type: 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. Scheduling Print Jobs 1. At the prompt, type: smit sjat 2.
Changing or Showing Queue Characteristics The following procedures apply to both local and remote print queues and print queue devices. 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 change queue or queue device characteristics, you must have root authority. Change or Show Print Queue Characteristics 1. At the system prompt, type: wsm devices 2.
Specifying Paper Size Prerequisites To perform this task, the print queue must already be configured. Procedure 1. Load paper in the paper tray. 2. Refer to 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, type: wsm printers 4. In the Web-based System Manager Printers container, double click on the printer icon. From the Selected menu choose Properties.
Changing or Showing Printer Connection Characteristics Prerequisites To perform this task, you must be one of the following: • root • A member of the printq group Procedure 1. At the system prompt, type: wsm devices 2. In the Web-based System Manager Devices container, double–click on a computer object to open its Properties. Information such as device name, type, interface type, and status display. You can also perform this task with the SMIT fast path smit chprtcom.
Changing / 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.
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. Procedure 1. At the system prompt, type: wsm printers 2.
Listing All Supported and Defined Printers Prerequisites None. List All Supported Printers At the system prompt, type: wsm printers then press Enter to open Web-based System Manager Print Queues. You can also use the smit lssprt fast path command. Output similar to the following is displayed: bull1021 parallel Bull Compuprint Page Master 1021 . . . ibm2380 parallel IBM 2380 Personal Printer II ibm2380 rs232 IBM 2380 Personal Printer II ibm2380 rs422 IBM 2380 Personal Printer II . . .
Moving a Printer 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. Procedure 1. At the system prompt, type: wsm devices 2. In the Web-based System Manager Devices container, select the printer object you want to move. 3. Select Move To... from the Selected menu.
Changing or Showing Printer Characteristics Prerequisite A printer must have been added. Procedure 1. At the system prompt, type: wsm devices 2. In the Web-based System Manager Devices container, double–click on the printer object. Note: If the printer has a print queue, or if the printer is attached to a serial port on an Xstation, you can change the printer connection characteristics with the wsm devices fast path or the chprtcom commands.
Deleting a Printer 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 if you want to also delete the print queues. Prerequisites • A printer must have been added. • You must have root authority. Procedure 1. At the system prompt, type: wsm devices 2. In the Web-based System Manager Devices container, use select the printer object you want to delete. 3. Select Delete from the Selected menu.
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) protocol 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.
The following sections discuss how to configure, use and manage a remote printing environment: • The rembak Program • The lpd daemon rembak Program The local queue set up to serve remote print requests must be configured to use rembak, the remote print backend command. When you set up the queue, the system prompts for a backend program path name. The entry at this prompt tells the qdaemon command which backend program to use to process print requests.
Note: The /etc/hosts.equiv file defines which computers on a network are allowed to execute certain commands on a local host without supplying a password. The /etc/hosts.lpd file defines which computers on a network are allowed to execute print commands on a local host without supplying a password. The lpd daemon on the remote print server monitors port 515 for print requests. When the lpd daemon receives a print request from a valid host, it places the request in the specified queue.
Managing and Using Remote Printers and Queues In order 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. You can set up a remote queue with the Web-based System Manager wsm printers fast path. You can also use the smit mkrque command.
Configuring a Remote Host as a Print Server The host to be used as a print server must be configured to accept remote print requests. A host must be listed in the /etc/hosts.lpd file on the print server to have permission to print. To add a print queue host name to the /etc/hosts.lpd file using the Web-based System Manager fast path: 1. At the system prompt, type: wsm printers 2. In the Print Queues container, select a computer object. 3. Select Properties from the Selected menu. 4.
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 1. At the system prompt, type: wsm printers 2. In the Print Queues container, select a computer object. 3. Select Properties from the Selected menu to view a list of remote print server hosts.
Using the lpd Remote Subsystem Prerequisites • Your system must be configured to communicate with a remote print server. • To start or stop the lpd remote subsystem, you must have root authority. Start the lpd Remote Subsystem 1. At the system prompt, type: wsm printers 2. In the Print Queues container, select a computer object. 3. Select Properties from the Selected menu. 4. Select Start lpd daemon. For detailed information or assistance, see the online help.
Showing Status of Printer Server Subsystem Use the SMIT fast path to perform this task. Procedure 1. At the system prompt, type: smit server 2. Select Show Status of the Print Server Subsystem.
Printer Queuing System Status Conditions If a printer/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.
DOWN Specifies that the device driver cannot communicate with the printer (CD or CTS dropped or is low) after TIMEOUT seconds. The TIMEOUT value indicates the amount of time, in seconds, that the queuing system waits for a printer operation to complete. You can set this value using SMIT. A queue usually goes into the DOWN state after it has been in the DEV_WAIT state. If a queue goes directly into the DOWN state, either the TIMEOUT value is too small or there are cabling problems.
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 This section provides an overview of the spooler mechanisms used by Version 3.2.5 and AIX Version 4. 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 AIX operating system, it is used as the primary example in this section. Using piobe in this fashion will allow a better development of AIX spooler concepts. Appropriate notes indicate significant differences between Version 3.2.
Spooler Terminology The following terms relate to the spooler overview. Spooler The AIX spooler is a collection of programs, configuration files, and data files that provide the following functions or services: • Provides for the construction of queues, which are software entities whose function is to process jobs in specific ways • Allows users to submit jobs (usually but not always printer jobs) to a queue for processing.
• For print jobs, uses printer and formatting attributes from the database, overridden by any flags specified on the command line. • Initializes the printer before processing a print job. • Provides filters for simple formatting of ASCII documents. • Uses filters to convert print job data stream to a format supported by the printer. • Provides support for printing national language characters. • Passes the filtered data stream of a print job to the printer device driver.
• Diablo 630 • ditroff Printer Devices A printer/plotter device is a special file in the /dev/directory for a real printer. This file can be used by redirection (for example, cat FileName > /dev/lp0) or by user–written, compiled programs. Settings for this device driver can be displayed and changed using the splp command. Before any of the spooler commands can access a printer device, a print queue must be created for the device.
The Generic AIX Spooler The AIX Version 3 and Version 4 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 AIX spooler can be viewed as a process or a subsystem with a beginning, points–in–between, and an ending. To accomplish its tasks, the AIX 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 Part I The general flow of a job through the AIX Spooler is depicted in the Printing with AIX Operating System figure. AIX device driver Redirection lp lpr Queue enq qdaemon (Local) piobe Xstation interface qprt LAN Attach interface Socket from client lpd (Remote) rembak Socket to server Printing with AIX Operating System There are four commands that can be used to submit a job to the AIX spooler. These are lp, lpr, qprt, and enq.
can also send an extensive amount of control data to a printer, for instance to initialize the printer to a specific mode before the processed job is delivered to the printer. It is piobe that makes the initial use of the data stored in printer colon files. The last program in the pipeline set up and controlled by piobe is responsible for the physical delivery of the byte stream generated earlier in the pipeline.
Spooler Data Flow Part II 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. Type mount /bin/echo /bin/enq and press Enter. 2. Type qprt –Pasc –fp –z1 –p12 –s courier –C –N 3 /etc/motd and press Enter. 3.
In all versions of AIX prior to Version 4, the qdaemon assigns the job a job number when it accesses the JDF and reads its contents into the aforementioned internal data structure. In Version 4, the job number is assigned by enq. This change was made so lp would be compliant with industry standards (lp is supposed to return a job number when the job is submitted, regardless of whether or not the qdaemon accepts the job). This means two things.
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.
qdaemon (Receives arguments via argc, argv[] from qdaemon) backend (piobe) shell optional filter 2 3 1 pioformat device-dependent code pioout 4 5 device driver (/dev/lpx) 6 7 Data stream Flow for Common Print Jobs See the area labeled 1 in the data stream Flow for Common Print Jobs figure. When the device upon which the job is queued becomes available, the qdaemon invokes the backend for the queue. In the AIX world, the backend is commonly piobe.
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. See the area labeled 2 in the Data stream Flow for Common Print Jobs figure, on page 3-13. 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 pioformat command expects to be able to call, if necessary, five subroutines; pioformat by itself does not contain these subroutines. The subroutines exist in the device–dependent formatter and are supplied to pioformat at runtime when the loading and linking of the device–dependent formatter by pioformat occurs. The formatter driver is invoked by a pipeline and is passed the name of a formatter to be driven.
/etc/qconfig, the Spooler Configuration File /etc/qconfig File Structure /etc/qconfig is the most important file in the spooler domain, for these reasons: • It contains the definition of every queue known to the spooler. • A system administrator can read this file and discern the function of each queue. • Although it is not recommended, this file can be edited to modify spooler queues without halting the spooler.
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, via smit and the piomkpq command. The virtual printer definition is not contained in /etc/qconfig.
Summary The Spooler Data Flow Summary figure summarizes the high–level flow of a spooler print job through the AIX spooler. Front Ends SMIT BSD lpq lpr lprm lptest ATT cancel disable enable lp lpstat AIX qadm qcan qchk qpri qprt qhld qmov calls creates enq JDF reads qdaemon calls /etc/qconfig /etc/qconfig.
Chapter 4.
Printer Backend Overview for Programming The AIX printer backend receives and processes print requests from a spooler, usually the qdaemon command. The printer backend is a standard feature of the AIX system. It is implemented by the piobe command and functions as depicted in the Printing with AIX Operating System figure.
Printer Backend Data Flow The primary purpose of a backend is to send characters to a device, usually a printer. The printer backend is invoked once for every file or group of files to be printed, with the name of each file passed to the backend as a parameter. The backend opens the file, reads it, and sends it to the device. The recommended method for a backend to operate is to write to its standard output, with the qdaemon process opening the device onto the correct file descriptor.
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.
names must not begin with a numeral. All attribute names must be two characters long, except for group header attribute names, which can be five characters long. 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 rest of this section describes the following groups of virtual printer attributes.
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
Some typical _ _SYS attributes for a supported PostScript laser printer are: _ _SYS OTHER VALUES OF INTEREST TO THE SYSTEM ADMINISTRATOR sh Pipeline for Header Page %Ide/pioburst %F[H %Idb/H.ps | %Ide/pioformat –@%Idd/ %Imm–!%Idf/piofpt%f[j] si Users, Separated by Commas, to Get Intervention Messages; Null String Is Job Submitter sp Command Line Flags Prohibited For All –d values; Ignored: cmnrBDMPRT st 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 ASCII) /usr/bin/enscript –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 Stream; Ignored: cmnrBDMPRT /interleaf/ileaf5/bin/pl2ps–ppd IBM17521.
Filter Flag Attributes Attributes grouped under the _ _FIL group header attribute store command strings for text filter flags. The first character of the attribute name is always f and the second character denotes the type of filter. Filter flags, such as –p and –n specify to the backend program the type of filter used to format the print job.
files containing header and trailer page text, downloadable font files, and temporary files. The first character in a directory attribute name is d, and the second character designates the directory. The following example shows some of the directory attribute values for a supported PostScript laser printer: _ _DIR d1 Directory Containing Stage 1 Translate Tables (data stream to intermed.
_ _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” Pa
The colon file stores these same values as: :062:_ _WKV:: :472:w7::%?%S_s%”Courier”%=%tCourier–Bold%e%S_s%”Times–Roman”%=%tTim es–Bold%e%S_s%”Helvetica”%=%tHelvetica–Bold%e%S_s%”Times–Italic”%=%t Times–BoldItalic%e%S_s%”Helvetica–Oblique”%=%tHelvetica–BoldOblique% e%Iw8%; :370:wl::0 :381:wu::3 Command Aggregate Attributes Command aggregate attributes, grouped under the _ _CAG group header attribute, store values such as the command to initialize the printer and the command to restore the printer after a pr
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.
%Dxx Downloads to the printer the contents of the file whose full path name is specified by the xx attribute. The print job must have read access to the file. The primary use of this operator is to download fonts to a printer. %”sss” Pushes a pointer to the sss string constant 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.
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.
Note: The first value to be popped off the stack is the last one to be pushed onto the stack, and the second value to be popped off the stack is the one that was pushed onto the stack first. Bitwise Logical Operators: %& %| %^ %~ Pushes the result onto the stack. %& ANDs the first two values popped off the stack. For example, %{6}%{3}%& pushes a value of 2 onto the stack. %| ORs the first two values popped off the stack. For example, %{6}%{3}%| pushes a value of 7 onto the stack.
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. If the result is greater than 0, execution is transferred to the character following %wx. Mode: %o Starts using only original default values from the database instead of values that may have been updated from the command line (or during formatter processing). %r Returns to using the values that were being used before %o.
%vxy or %v[...] Similar to %fxy and %f[ . . . ], but used only in the command string for the pioout command, the Device Driver Interface Program, to generate flags and arguments for override values specified by the piobe command, the Print Job Manager. Flags are not generated when their arguments are equal to predefined default values. With %v, the values referenced by y or [ . . . ] have attribute names whose first character is @ (at sign) and whose second character is y or a character in the string [ . .
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).
The following attribute names are used for communicating from the piobe command (the print job manager) to the pioout command (the device driver interface program). The attribute values are referenced by flag arguments passed to the device driver interface program as specified in the pipelines. @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.
Suggested Attribute Names Suggested attribute names are names that are assumed by many formatter filters: First character is s System administrator value. First character is d Directory path. First character is m Miscellaneous value (constant). First character is w Work value (changes while formatting). First character is c Command aggregate. First character is a ASCII control code. First character is e Printer escape sequence.
Limits Field The limits field in the colon file contains two types of information. SMIT dialog information and validation information. SMIT Dialog Information Information used in building SMIT objects represent colon file attributes in the object data manager (ODM). These objects will be used in the Print a File, Printer Setup, and Default Job Characteristics dialogs. The limits field gives you some control over the type of sm_cmd_opt ODM object that is built for every object.
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, on page 4-27. 3. Creating an exports file, on page 4-27. 4. Compiling and linking the print formatter, on page 4-27. 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 Besides reading files and writing to devices, a backend must cooperate with the qdaemon in several ways: • Print extra pages as requested. • Periodically update status information (such as pages printed, percentage done, and waiting state). • Supply charges (accounting data) for the completed job. • Exit with some agreed–on codes. • Pass error messages through a special routine. • Set queue states as appropriate.
Printing Extra Copies The enq –N command prints extra copies of a file. For example, to print five copies of a file filename , enter this command: enq –N5 filename The enq command passes the information to the qdaemon process, which puts it into the status file. Backends should get the information by calling the get_copies routine, which returns the total number of copies requested.
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.
and assigns the first variable parameter pointer to the eighth parameter, the second variable parameter pointer to the sixth parameter, and the remaining variable parameter pointers to null strings. The print supervisor then calls the sprintf subroutine or a similar subroutine and pass 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.
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-28.
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. log_pages(pages) Updates the status file with the number of pages printed. log_percent(percent) Updates the status file with the percent of job completed.
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.
By convention, the printer command string’s 2–character attribute name is at index 0 in the Command Names array. If the character is not in the code page, the formatter repeats the process for the next stage–2 translation table in the ring. If the formatter cannot find a 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.
The Ti and To attributes in the printer–dependent colon files define the possible flow of the translating code set. The Ti attribute specifies the combination of the input and process code sets: [Input_code_set, ... ]Process_code_set, ... The To attribute specifies the combination of the process and output code: Process_code_set [Output_code_set0, Output_code_set1, Output_code_set2, Output_code_set3,... ], ...
The qprt –F flag specifies a font. The full path name, font alias, or the Xwindow Logical Function Description (XLFD) of an Xwindow font can be used with the –F flag. The –I flag follows a font path to find the Xwindow fonts and creates the _I attribute entry.
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.
For example, to print an MBCS file that was written with a new code set on an IBM–943 printer follow these steps: 1. Create a translation table in the /usr/lib/lpd/pio/transJP directory. The naming convention for the new file is NewCodeSetName_IBM–943. 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.
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. To learn more about attachment files, see: • Understanding the SMIT Interface • Attachment File Naming Conventions, on page 4-42 • Structure of Attachment Files, on page 4-43 • Attachment File Field Definitions, on page 4-44 Each new attachment type is defined in an attachment file.
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, type: 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.
Printer Colon File limits Field Operators 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.
For example, if the limits field contained ’E#’ , the sm_cmd_opt object class entry_type field equals the numeric value assigned to #. The entry_type field with a ’E#’ value takes only numeric input.
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.
F Allows control of the cmd_to_list_mode field of the sm_cmd_opt object. The cmd_to_list_mode field specifies how much of an item from a list should be used. The list is produced by the command specified in the cmd_to_list field object. For example, if the cmd_to_list field produced the following list: 60 (6 line per inch) 80 (8 line per inch) 66 Possible values for the F operator are: a Get all fields. This is the default value. 1 Get the first field. 2 Get the second field.
M Specifies a multi–select list which allows users to select more than one value from a given list of options. The M operator works exactly like the L operator list except that the multi–select field must be set to an m value. An example of a multi–select list operator entry is: :100:_l:M[print ”50\n55\n60\n65”]:60 R Specifies an option ring type of list. The op_type field is set to r .
Adding Support for Configuring a Network–Attached Printer Note: The information in this article is provided for backward compatibility only. The preferred method for adding new printer attachment definitions is through attachment files. For more information, see ”Printer Attachment Files”, on page 4-42. The following article discusses the information you need to add support for configuring a network–attached printer. This information is not necessary to configure a network–attached printer.
shows the statement types, and the fields they support. An x (ex) indicates that the statement supports the field. A – (minus sign) indicates that the statement does not support the field.
gotolabel Specifies the label of the statement to branch to after executing this statement. • For M statements, specifies the label of the statement to go to for m statements that do not have a gotolabel. If the gotolabel field is null, fall through. • For m statements, if the gotolabel field is null, branch to the gotolabel field of the M statement. • For V statements, if the gotolabel field is null, fall through. • For T statements, if the gotolabel field is null, fall through.
reserved2 Reserved for future use. pipeline Specifies a shell command to execute. Specifically: • For l statements, specifies the shell command to run. The output of the command is constructed into a menu. • For v statements, specifies the shell command executed to validate the values entered. A 0 (zero) return code indicates that the entered value is valid. msgid Specifies the message to be used by this statement.
Prompts Prompts can be constructed using the V statement plus one or more v statements to validate the response. After the V statement is executed, the user’s response is stored in an environment variable. The v statement can then be used to execute a shell command to validate the response. A 0 (zero) return code from the shell indicates no errors. A non–zero return code means an error was found; the specified message is displayed, and the user is prompted again for the input value.
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 refer to ”Listing All Supported and Defined Printers”, on page 2-43. • You must understand the printer colon files and their format.
%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 • Lexmark Optra Color 1200 Printer • Lexmark Optra Color 40 Printer • Lexmark Optra Color 45 Printer • Lexmark Optra K 1220 Printer • Lexmark Optra C Color • Lexmark Optra E LaserPrinter • Lexmark Optra N LaserPrinter • 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 • Lexmark Plus Printer Models 2380–3, 2381–3, 2390–3, 2391–3 • OKI MICROLINE 801PS/
Using SMIT”, on page 2-39 . To change paper size for a single print job, specify the –Q flag with the qprt command. 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, type 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.
2. Select the appropriate print queue and select Printer Setup on the Change/Show Characteristics menu. Specify yes in the AUTOMATIC MODE SWITCHING for PostScript attribute. 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.
IBM Proprinter Models 4201–3, 4202–3, 4207–2, 4208–2 If support for Greek or Turkish characters is needed and the appropriate font diskette is available, install the fonts by entering, as root user: piofontin –t PrinterType –c CodePage [–d DeviceName] Specifically, when issuing this command, the PrinterType parameter is 4201–3, 4202–3, and the CodePage parameter is 851 (Greek) or 853 (Turkish).
smit chpq 2. Select the appropriate print queue, then select Printer Setup on the Change/Show Characteristics menu. 3. Select the character set for the PRINTED LANGUAGE attribute. 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 cases: • Plug in a font cartridge that includes a font in Code Page 850. • Print using the font.
IBM Network Color Printer The predefined files on AIX Version 4.2.1 or later only supports 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.
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.0 or higher controller code and 16MB of memory. ibmncp_print 2.0 or higher controller code and 32MB or 48MB of memory. Note: To determine the controller code level and amount of memory on your IBM Network Color Printer, print a configuration page from the printer operator panel. See the configuration page under ”GENERAL INFO.
The IBM Network Printer 12, 17, and 24 support the following output bins. 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.
–e # Specifies staple and collation. The –e #option flag only works if a face–down finisher bin is selected. See –= option flag for more information. 0 Default Printer Setting 1 Portrait Staple 2 Landscape Staple 3 Two Portrait Staples 4 Two Landscape Staples 5 Offset Jog at end of Job 6 Offset Jog at end of Set 7 No Stapling or Collating Valid queue names located on the IBM Network Printer 12, 17, and 24 include: TEXT Data that requires line feed and carriage–return processing.
–Q # Specifies paper size for the print job. The –Q options for the InfoPrint 20 are: –s Name 1 Letter 2 Legal 3 Folio 4 11 x 17 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 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).
–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.
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 –= option flag).
–Q # Specifies the paper size for the print job.
To print more lines per page than the line space allows (6 or 8 lines per inch), specify the number of lines per page. The line spacing is compressed to allow the larger number of lines to fit on a page. For example, if the lines spacing is 6 lines per inch, entering the command qprt –l 66 FileName causes the file FileName to print at 66 lines per page instead of the default 60 lines per page.
Hewlett–Packard LaserJet 5Si and 5Si Mopier Printers Output Bins The base LaserJet 5Si and 5Si Mopier printers have two possible destinations: • Top output bin that prints face down. • Left–side output bin that prints face up in reverse order. If an optional High Capacity Output (HC0) device is installed, the additional trays are available as well. AIX 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.
Hewlett–Packard LaserJet 8000 and 8500 Color Printers Output Bins The base LaserJet 8500 Color and LaserJet 8000 printers have two possible destinations: • Top output bin that prints face down. • Left–side output bin that prints face up in reverse order. If an optional High Capacity Output (HC0) device is installed, the additional trays are available as well. The output bins can be accessed using the (–=) flag of the qprt command.
Number of Copies The LaserJet 8000 and 8500 Color printers support printing copies internal. With the –W flag, only one copy of the print job is sent to the printer and the copies are then produced by the printer. The basic format is: –W # Paper Size Specifies paper size for the print job.
Lexmark 4227 Forms Printer Paper Source Paper source selection is supported by using the –u flag of the qprt command. –u 1 tractor 1 –u 2 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.
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. –q 300 –q 600 –q 1200 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.
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. –q 300 –q 600 –q 1200 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 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. The –N# flag will cause the printer job to be sent to the printer # times. The –W# will send the print job once, and # copies of the job will be printed.
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 5 Emulation Mode To print color files, or any preformatted print job in PCL language, use the –dp flag of the qprt command. This sets the AIX 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 Commands Reference, Volume 3 for information about the lsvirprt command.
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 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.
Print Resolution The Optra E printer supports print resolution of 300 and 600 dpi using the –q flag of the qprt command. The default is 300 dpi. –q 300 –q 600 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 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 (refer to 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.
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. The first five paper sizes are also numbered for backward compatibility. Whenever an invalid value for the input source is selected, it is ignored. The default for –O is 3 or paper.
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.
Separator Pages The Optra N printer supports internally generated separator pages. This feature is controlled by the –E flag of the qprt command. –E 0 None –E 1 Between Copies –E 2 Between Jobs –E 3 Between Pages The paper source defaults to tray 1. To change the default, the uS attribute must be changed in the virtual printer.
Staples The –y option controls whether staples are desired or not. Only certain paper sizes are supported for each of the values for this flag. Also, there are several rules about output quantities and destinations. Refer to printer documentation for details on all the possibilities. The valid values are: 0 no staples (default) 1 one staple (top left) 2 two staples (left side) Job Offset The –e flag controls whether offsetting the first page of each job in the finisher bin is desired.
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. Paper Sizes (–0 3) Envelope Sizes (–0 4) –Q 1 Letter 7 3/4 Monarch –Q 2 Legal 9 (Com 9) –Q 3 B5 10 (Com 10) –Q 4 A4 DL –Q 5 Executive C5 –Q 6 A5 B5 Envelope –Q 7 Other Envelope (MPT only) To change the defaults, change the s1, s3 attribute values in the lexOptraE310.pcl colon file.
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 Output Destination 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 Output Destination 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.
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 printer supports internally generated separator pages. This feature is controlled by the –E flag of the qprt command. –E0 None –E1 Between Copies –E2 Between Jobs –E3 Between Pages The paper source defaults to Tray 1. To change the default, the uS attribute must be changed in the virtual printer. The valid values for uS are: uS 1 Tray 1 uS 2 Tray 2 uS 3 Tray 3 uS 4 Tray 4 Note: This function is independent of the –B flag of the qprt command.
Hole Punch The Optra W810 printer supports this option if it has an optional Finisher installed. The valid values for o are: Output Destination –o 0 Off –o 1 On The –= (equal sign) is the command line option for specifying the output destination. Valid values are: 0 standard bin 1 bin 1 2 bin 2 3 bin 3 4 bin 4 5 bin 5 6 bin 6 7 bin 7 8 bin 8 9 bin 9 10 bin 10 The default value for the output destination is the standard bin (0).
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.
Printronix P9012 Line Printer Only the Serial Matrix command set is supported. The P–series command set is not supported. QMS ColorScript 100 Model 20 Printer The QMS ColorScript 100 Model 20 printer can print color PostScript files and HPGL (Hewlett–Packard Graphics Language) files. The HPGL emulator is shipped on a DOS diskette with the printer. ASCII files can also be printed using the PostScript data stream.
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, type: smit lssprt To install support for additional printers, type: 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–90 • Canon LASER SHOT LBP–A404PS/Lite • Canon LASER SHOT LBP–B406/S/D/E/G,A404/E,A304E • Dataproducts LZR 2665 Laser Printer • Dataproducts BP2000 Line Printer • HP 2500C Color Printer • HP LaserJet ll • 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 5000 D640 Printer • HP LaserJet 8100 Printer • HP LaserJet Color • HP Color LaserJet 4500 Printer • IBM 2380 Personal Printer II • IBM 2380 Pl
• 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 Personal Page Printer, Model 031 • IBM 4216 Model 510 • IBM 4224 Printer, Models 301, 302, 3C2, 3E3 • IBM 4226 Printer • IBM 4234 Dot Band Printer, Model 013 • IBM 5202 Quietwriter III • IBM 5204 Quickwriter • IBM 5327 Model 011 • IBM 5572 Model B02 • IBM 5573 Model H02 • IBM 5575 Model B02/
• Lexmark Optra Plus LaserPrinter • Lexmark Optra C Color LaserPrinter • Lexmark Optra E Color LaserPrinter • Lexmark Optra E310 Laser Printer • Lexmark Optra M410 Laser Printer • Lexmark Optra N Color LaserPrinter • Lexmark Optra Se Laser Printer • Lexmark Optra T Laser Printer Family • Lexmark Optra W810 Laser Printer • Lexmark ExecJet IIc • Lexmark ValueWriter 600 • Lexmark 2380 Plus Printer (Model 3) • Lexmark 2381 Plus Printer (Model 3) • Lexmark 2390 Plus Printer (Model 3) • Lexmark 2391 Plus Printer
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. ”Pass–through mode” simply means that 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.
and in other similar situations, it does not work with printers. Printers only print the data which they are sent. Issuing the two commands splp –p+ lp0 cat /etc/motd > /dev/lp0 results in something like the following appearing on the printer. This is a test version of /etc/motd, used to demonstrate what hap pens when a printer device driver, such as /dev/lp0, is placed into or taken out of passthru mode .
Note that input data streams such as PostScript are pass–through by definition; the processing is performed by the Postscript interpreter hardware on the printer. Most of the printer device driver parameters that one can display or modify using the splp command also exist in the formatter filter. These parameters are stored in the digested version of the colon file for a given virtual printer.
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.
Name ia To To To To To Description ASCII Value %Ide/pioformat –@% Idd/%Imm –!%Idf/pi of5202 –l%IwL –w%I wW %f[begijpqstuvx yzEGIJLOQWXZ] %Uh 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. The definition for a generic Postscript printer on a system running AIX Version 3.2.5 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 piobe has the ability to generate diagnostic output. A specific example of this diagnostic output is used in the following discussion to examine the following: • 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. • How printer colon file escape sequences are evaluated to resolve page width.
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. Here the pipeline of filters determined by piobe and constructed by the shell can be seen. The pr filter will pre–process the print job (/etc/motd) and send its output to pioformat, the device–independent formatter driver.
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. Thus the value of the –@ flag to pioformat becomes /var/spool/lpd/pio/@local/ddi/ibm4029.asc.lp1.asc.lp1, the full path of the digested database file defining the virtual printer associated with this queue (asc).
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.
Primary Page Width (–z 0) or Secondary Page Length (–z1), in pels wJ = %G_Q%Pq%?%GWu%{3}%<%t%?%gq%{1}%=%t%{2400}%e%gq%{2}%=%t%{2400 }%e%gq%{3}%=%t%{1999}%e%gq%{4}%=%t%{2330}%e%{2025}%;%e%?%gq%{1}%= %t%{1012}%e%gq%{2}%=%t%{1012}%e%gq%{3}%=%t%{1087}%e%gq%{4}%=%t%{1 149}%e%gq%{5}%=%t%{1763}%e%{1928}%;%;%d %G_Q %Pq %? %t %e PUSH: (PAPER SIZE override for input paper source) POP –> Internal Variable q %GWu PUSH: (Calculate value for paper source based on _ O and _u.
%t %e %t %e %; %; %d %{1149} PUSH: (Integer Constant 1149) %gq PUSH: (Internal Variable q) %{5} PUSH: (Integer Constant 5) %= PUSH: (pop2 = pop1 ?) %{1763} PUSH: (Integer Constant 1763) %{1928} PUSH: (Integer Constant 1928) POP –> ASCII String –> OUTPUT 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.
%? PUSH: (1 If –O Flag on Command Line; Otherwise 0) PUSH: (Type of INPUT PAPER HANDLING (backward %CO %t %? %G_O compatibility %{1} %= %t %? purpose only)) PUSH: (Integer Constant 1) PUSH: (pop2 = pop1 ?) %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:
value popped is less than the first value popped. 1 is less than 3, so a 1 is pushed onto the stack. The %t finds the 1 and so enters the if–then–else–then–else–then–else... sequence looking for an integer to pair with the paper size value calculated for _Q. 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.
%d 34 33 2400 32 39 38 48 %t %d 31 1 %= 23 %/ 30 1 %{1} 22 %{300} 29 1 %gq 21 %* 28 %t 20 1 %= %d 1 %Gs1 37 300 36 14400 35 6 %G_v 27 1 %< 19 1 %{1} 7 2400 %GwJ 26 3 %{3} 18 1 %GWu %t 25 1 %GWu 17 24 %Pq 16 %GwQ %G_Q 6 5 1 %& 2 48 %I_l 4 1 %{1} 9 1 0 %Cl 3 1 %G_z 8 wL %{2400} _l 1 %t %t 14 0 %= 13 15 0 %{0} 12 10 1 %GWu 11 wJ wQ %d 1 %G_u %t 0 %CO Wu Calculation of Page Length 1.
19.%{1} – Pushes a 1 onto the stack. 20.%= – Pops the two 1s off the stack, compares them for equality, and pushes the resultant 1 onto the stack. 21.%t – Pops the 1 off the stack and, since it is a TRUE (non–zero) values, calls for the evaluation of %Gs1. 22.%Gs1 – Pushes a 1 onto the stack. 23.%d – Pops the 1 off the stack and returns it, in ASCII format, to the in–progress calculation of wJ. 24.%Pq – Pops the 1 off the stack and stores it in the internal variable q. 25.
The first item checked in the evaluation of _l (page length) is page orientation (_z). As noted above, rotating the page by odd multiples of 90 degrees flips the page dimensions. Looking at the if–then–else statement that is the beginning of the definition of wY, it can be seen that the value of _z is a switch that controls which of wJ and wK will be used for page length. If the page has a portrait orientation, then wK is length. If the page has a landscape orientation, then wJ is length.
• s1 – paper size for tray 1 (upper) • s2 – paper size for tray 2 (lower) • s3 – envelope size for envelope feeder • s4 – envelope size for manual envelope size In the virtual printer definition for an ASCII queue on an IBM 4029 LaserPrinter, there are only two unique values for these five attributes: s0, s1, and s2 are all 1, while s3 and s4 are both 3. Looking back up the nested escape sequences, you can see that the definition of wJ is composed of an outer if–then–else statement.
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.
%? %G_z %{1} %& %t %GwK Page Width (–z %e %GwJ Length (–z %; %? %G_p %{17} %= %t %{171} %e %G_p %{10} %* %; %* %? %G_W %t %{6000} %e %{3000} %; %/ %d PUSH: (Page ORIENTATION) PUSH: (Integer Constant 1) PUSH: (pop2 & pop1) –– Bitwise AND PUSH: (Primary Page Length (–z 0) or Secondary 1), in pels) PUSH: (Primary Page Width (–z 0) or Secondary Page 1), in pels) PUSH: (PITCH (characters per inch)) PUSH: (Integer Constant 17) PUSH: (pop2 = pop1 ?) PUSH: (Integer Constant 171
%< %t %? %t %e %t %e %t %e %t %e %; %e %? %t %e %t %e %t %e %t %e %t %e %; %; PUSH: (pop2 < pop1 ?) %gq PUSH: (Internal Variable q) %{1} PUSH: (Integer Constant 1) %= PUSH: (pop2 = pop1 ?) %{3200} PUSH: (Integer Constant 3200) %gq PUSH: (Internal Variable q) %{2} PUSH: (Integer Constant 2) %= PUSH: (pop2 = pop1 ?) %{4100} PUSH: (Integer Constant 4100) %gq PUSH: (Internal Variable q) %{3} PUSH: (Integer Constant 3) %= PUSH: (pop2 = pop1 ?) %{2935} PUSH
%d POP –> ASCII String –> OUTPUT 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.
The Calculation of Page Width figure depicts the stacks operations (as described above) used to obtain a final numeric value for page width in characters. The following 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.
11. %CO – Pushes a 0 onto the stack since the O flag was not used on the command line. 12.%t – Pops the 0 off the stack and, since it is a FALSE (zero) value, calls for the evaluation of %G_u. The stack labeled Wu is now empty. 13.%G_u – Pushes a 1 onto the stack. 14.%d – Pops the 1 off the stack and returns it, in ASCII format, to the in–progress calculation of wQ. 15.%{0} – Pushes a 0 onto the stack. 16.
41.%* – Pops the top two values (a10 and a 12) off the stack, multiplies them together, and pushes the resultant 120 onto the stack. 42.%* – Pops the top two values (a 120 and a 3200) off the stack, multiplies them together, and pushes the resultant 384000 onto the stack. 43.%G_w – Pushes a 0 onto the stack. 44.%t – Pops the 0 off the stack and, since it is a FALSE (zero) value, calls for the evaluation of %{3000}. 45.%{3000} – Pushes a 3000 onto the stack. 46.
• u – input paper source – 1 (primary), 2 (alternate), 3 (envelope) – default is primary. • Q – paper size for input paper source – values are printer–dependent – defined by combination of O and u. 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.
A 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 width of 2750 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).
Spooler Job Header and Trailer Pages The pipelines for generating header and trailer pages are defined by the system administation attributes 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.
Custom Header Pages The root user can create custom header pages for users by modifying the definiton of the sh attribute. Since 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.ascii in the above definition specifies which header page template should be processed and printed.
’{ if test X”$MYHEADER” = X ; then ’ %Ide INCLUDE: (Directory Containing Miscellaneous Modules) ’/pioburst ’ %F[H] If ”–H] Argument” on Command Line, ”–# Argument” –> OUTPUT ’ ’ %Idb INCLUDE: (Directory Containing Header and Trailer Text Files) ’/H.ascii | ’ %Ide INCLUDE: (Directory Containing Miscellaneous Modules) ’/pioformat –@’ %Idd INCLUDE: (Directory Containing Digested Data Base Files) ’/’ %Imm INCLUDE: (File Name Of (Digested) Data Base; Init. By ”piodigest” (mt.md.mn.
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.
Choose the file option, then choose a printer type. After you choose the IBM 4029 LaserPrinter (or whatever is correct for your situation), provide the name of an existing file in the /dev directory. This is the file to which processed jobs submitted to the queue you are creating are written. The name of the file can be anything that adheres to AIX naming conventions. A reasonable action is to create a file just for the purpose of being the target of file queues.
In general, the mo attribute in the virtual printer definition for a queue with piobe as the backend can be redefined to deliver a processed data stream to any file or device the user chooses, provided the you can write the code to do it.
Filters Virtual printer definitions in both Version 3.2.5 and AIX Version 4. contain predefined and open (undefined) filter attributes; AIX Version 4. offers a richer set of filter attributes. For instance, 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.
These are the arguments qprt tried to pass to enq. You get to 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. The –o option can be thought of as a free pass through the syntax checking that occurs before the enq command builds a job description file and notifies the qdaemon of the existence of a new job.
Supposing 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 main(int argc, char **argv) { int ch ; while (EOF != (ch = fgetc(stdin))) { switch (ch) { case 10: fputc(ch,stdout) ; fputc(0x0D,stdout) ; break ; default: fputc(ch,stdout) ; break ; } } } Compile this and name it cr_mapper . and install it somewhere accessible, such as /usr/lib/lpd. Assign it ownership of root.
Editing /etc/qconfig 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 /etc/qconfig without halting or otherwise corrupting the operation of the spooler. Modifying /etc/qconfig While Jobs are Processing /etc/qconfig should never be edited when jobs are processing. This is especially true when your system has a large number (greater than 25) of printers that are generally pretty busy.
4-166 Guide to Printers and Printing
Chapter 5. Troubleshooting the AIX Spooler Use the information in the following checklists to help resolve printing problems.
Local Printer Checklist • 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 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 the ”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.
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 Scenario: Submitting jobs to the spooler causes no discernible spooler activity; this is a well–known scenario in Version 3.2.5. 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.
printers that show RUNNING jobs and verify that at least one job is actually running. If one or more printers are showing DEV_WAIT because of paper jams or because they are out of paper, fix the problem and see if the printer begins printing. If it does begin printing, again use lpstat to see if the queue status is RUNNING. In any of these circumstances, the point is to verify that at least one printer is actually printing even though the qdaemon is not starting new jobs.
Testing a Spooler Queue When spooling jobs from an application, it’s 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.
Index Symbols input values, 4-14 internal variables, 4-16 logical operators, 4-16 pass through from input to output, 4-17 relational operators, 4-16 /etc/qconfig file structure, 3-17 Numbers 5080 Attachment Adapter, 2-14 A ASCII files, printing on PostScript printer, 1-16 ASCII terminal, configuring a printer for, 2-30 attachment files, 4-42 B backend printer, 1-3 processing, 3-12 routines libqb, 4-33 backends, printer, 2-3 C Canon LASER SHOT printer, 4-73 code sets, multibyte, 4-39 colon file, to add
device characteristics, 2-38 deleting, 2-42 listing print queue devices, 2-31 print queues, 2-31 starting and stopping, 2-33 status conditions, 2-55 print server, remote, 2-51 print spooler, 1-2 defined, 2-2 printer, 4-52 adding, 2-11 adding an undefined, procedure of using colon file, 4-57 backend commands, 2-28 defined, 1-3, 2-3 canceling a job, 1-8 characteristics, 2-45 colon files, 4-20 limits field operators, 4-46 commands for the, 2-1 configuring printer for an ASCII terminal, 2-30 printer port, 2-10,
remote printing overview, 2-47 remote host access, 2-52 RS–232 adapter, printer considerations, 5-5 S SMIT printer paper size specifying for Hewlett–Packard printers, 2-39 specifying for IBM printers, 2-39 printing, control of, 1-4 SMIT (System Management Interface Tool) interface to printer attachment files, 4-42 sm_cmd_obj object class, used with printer files, 4-46 smit command, 1-7 spooler, 2-2, 3-1 configuration file, etc/qconfig file structure, 3-17 data flow, 3-8 parts, 3-7 queues, 3-18 terminology,
X-4 Guide to Printers and Printing
Vos remarques sur ce document / Technical publication remark form Titre / Title : Bull Guide to Printers and Printing Nº Reférence / Reference Nº : 86 A2 37JX 02 Daté / Dated : November 1999 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 ELECTRONICS ANGERS CEDOC ATTN / MME DUMOULIN 34 Rue du Nid de Pie – BP 428 49004 ANGERS CEDEX 01 FRANCE Managers / Gestionnaires : Mrs. / Mme : C. DUMOULIN Mr. / M : L.
PLACE BAR CODE IN LOWER LEFT CORNER BULL ELECTRONICS ANGERS CEDOC 34 Rue du Nid de Pie – BP 428 49004 ANGERS CEDEX 01 FRANCE ORDER REFERENCE 86 A2 37JX 02
Utiliser les marques de découpe pour obtenir les étiquettes. Use the cut marks to get the labels.