Previous section   Next section

PRINT COMMANDS

Within Windows Server 2003 a printer can be attached to the local system or to the network. This section outlines the steps necessary to create a printer, send files to print, determine the status of a print job, manage printer operations, and define printer properties.

Creating a Printer

Here creating a printer means installing it so that it is accessible to both users and applications. Windows Server 2003 simplifies this process with the Add Printer Wizard, which can be accessed in three ways:

Printers can be created as local or as remote. To create a local printer, from the Add Printer Wizard:

  1. Click My Computer and click Next.

  2. Choose the port the printer is connected to from the Available Ports list; then click Next.

  3. Choose the manufacturer and printer from the lists provided; click Next. (Before clicking Next, you may click Have Disk in order to install the printer driver at this point. If a printer driver is necessary, you will have an opportunity to install it later as well.)

  4. Enter a name for the printer that your users will understand and recognize. You may also designate whether this printer will be considered the default for the system. Click Next.

  5. If the printer is to be shared over the network, select Shared and either accept the shared printer name displayed or enter one that you prefer. Remember, if this printer is to be available to MS-DOS and Windows 3.x users, be sure the name is consistent with their file-naming restrictions of eight characters before a period and three characters after (filename.ext).

  6. If sharing the printer over the network, select the operating systems that will be accessing it. Click Next.

  7. Click Yes to print a test page; No to bypass it.

  8. Click Finish to complete the installation.

  9. At this point, the wizard may request that you insert the media that contains the print drivers for the operating systems that you selected. Just follow the instructions on the screen.

Creating a remote printer is often referred to as "connecting to a network printer." This printer can be new or it may have already been installed elsewhere on the network. To create a remote printer, access the Add Printer Wizard and follow these steps.

  1. Select Network Printer Server; click Next.

  2. The Connect to Printer window displays. From the Shared Printers list, choose the network printer to which you wish to connect, then click OK.

  3. Click Finish to complete the installation.

Sending Files to Print

To ensure that a file is printed correctly, we recommend using the print facility provided by the application that created the file. From within a Windows-based application, select the Printer icon to send a file to the default printer. To select a specific printer, select File Print from the menu bar.

Files recognized by Windows Server 2003 can be dragged and dropped on the icon for the desired printer. To accomplish this, select Start Settings Printers to display the printer icons. Then, using either Explorer or the My Computer windows, select a file and drag it to the appropriate icon in the Printers window; release the mouse button to drop it.

IPR COMMAND

The lpr command enables a user to print to a computer that is running the LPD server. Thus, a Windows Server user can print to a UNIX printer. The syntax is

lpr –Sserver –Pprinter [options] filename

Enter for filename the name of the file to be printed. All other parameters and options are described in Table A.64.

Table A.64. lpr Options

Option

Qualifier

Description

-S

server

Enters the name of the computer where the printer is attached for the variable server. This is a required parameter.

-P

printer

Enters the name of the printer in place of the variable printer. This is a required parameter.

-C

class

Enters the class of the print jobs in order to list the contents of the banner page. This is an optional parameter.

-J

jobname

Enters name of this print job in place of the variable jobname.

-O

option

Describes the type of file to be printed. The default is a text file. A lowercase l is entered to signify a binary file, such as a PostScript file. In this case, the option is –Ol.

PRINT COMMAND

The print command enables the user to print a text file in the background. The syntax is

print [/d:device] filename(s)

Executing print without options or parameters will display a list of the files currently in the print queue.

The first parameter, /d:device, is optional and designates the name of the print device. Acceptable values are LPT1, LPT2, and LPT3 for parallel ports; COM1, COM2, COM3, and COM4 for serial ports; and \\servername\sharename for a net work printer where servername is the name of the server and sharename is the name of the shared printer resource. The default value for /d:device is PRN, which is the same as LPT1, the first parallel port.

The filename(s) parameter is optional and should include the name of the file or files to be printed. Multiple file names are separated by a space. If necessary, a drive designation and pathname may be entered in the format drive:path\filename.

As a note of interest, PostScript files require the copy, not the print, command. For example, copy file.ps lpt1: prints a PostScript file on LPT1.

Print Status

To determine the status of files in the print queue, select Start Settings Printers and double-click the appropriate printer. A status window for that printer will display containing the following information for each print job printing or waiting to print:

LPQ COMMAND

The lpq command displays status information for a print queue on a host computer running the LPD server. The syntax is

lpq –Sserver –Pprinter [–l]

Table A.65 lists the options for the lpq command.

Table A.65. lpq Command Options

Option

Qualifier

Description

-S

server

Enters the name of the computer with the printer attached for the qualifier server. This is a required parameter.

-P

printer

Enters the name of the printer to identify the queue to display status information. This parameter is required.

-l

 

Included only when a detailed status report is desired.

NET PRINT COMMAND

The net print command displays information about printer queues and printer jobs. It also deletes, suspends, or reactivates print jobs. Net print has two formats, the first of which is

net print \\computername\sharename

This format displays, for each print queue, name, number of jobs, and status. For each job in the queue, it displays user name, job number, size, and status. Table A.66 defines the parameters.

The second format is

net print [\\computername] job# [options]

This format either displays information about a specific job number or enables you to control network print jobs. The \\computername parameter is optional and should contain the name of the computer sharing the printer queue. The job# parameter is required and should contain the number of the print job in question. This number is part of the print queue listing that can be displayed using the net print \\computername command. The options are described in Table A.67.

Table A.66. net print Parameters

Option

Description

\\computername

Enters the name of the computer sharing the print queue.

\sharename

Enters the name of the specific print queue. This parameter is optional; when not entered, the net print \\computername command displays all print queues on this computer.

Table A.67. net print Command Options

Option

Description

/delete

Deletes job# from the printer queue.

/hold

Puts a hold on a job# that is waiting in the print queue so that it will not print but stays in the print queue until it is released or deleted.

/release

Releases a job# that has been put on hold.

net print Command Examples

To display all print jobs in the marketing print queue on the computer incy, enter

net print \\incy\marketing

To delete print job 12 from that computer, enter

net print \\incy 12 /delete

Managing Printer Operations

Once a document is in the print queue, several operations can be executed to pause and resume printing, restart documents from the beginning, and cancel documents.

PAUSING AND RESUMING A PRINTER

Pausing a printer stops printing but permits files to be accepted into the print queue. To pause a printer:

  1. Select Start Settings Printers.

  2. Double-click the icon for the desired printer.

  3. From the selected printer's window, select Printer Pause Printing; the title bar will display "Paused."

To resume printing, select Printer Pause Printing from the printer's window.

PAUSING AND RESUMING PRINTING

To suspend printing:

  1. Select the desired document from the printer's window.

  2. From the menu bar, select Document Pause; the status column for the document will display "Paused."

To resume printing

  1. Select the paused document from the printer's window.

  2. From the menu bar, select Document Resume.

RESTARTING AND CANCELING A DOCUMENT

To restart the printing of a document from the beginning:

  1. Select the document to be restarted from the printer's window.

  2. From the menu bar, select Document Restart.

To remove a document from the print queue (i.e., cancel it):

  1. Select the document to be canceled from the printer's window.

  2. From the menu bar, select Document Cancel.

Defining Printer Properties

In order to define or change the default behavior of a printer, the printer properties must be modified. To do this, first select Start Settings Printers and right-click the desired printer icon. From the menu that displays, select Properties. Another way is to double-click the desired printer icon to display the printer's window and then, from the menu bar, select Printer Properties.

The Properties window contains six tabs. A brief description of each follows.

LPD Service

The LPD Service (lpdsvc), referred to as the TCP/IP Print Service in Windows Server 2003, enables printers to print jobs from remote clients such as UNIX systems. As part of the Resource Kit, it is installed as follows: Select Start Settings Control Panel Network Services. Within the Services window, select Add. From the Network Service list, select Microsoft TCP/IP Printing, then click OK. At this point, follow the instructions on the screen, including inserting the Windows Server 2003 Resource Kit CD-ROM so that additional files may be installed. Once the files have been installed, restart the computer.

To start the LPD Service, select Start Settings Control Panel Services. From the list, select TCP/IP Print Server, then click Start.


  Previous section   Next section
Top