Novell is now a part of Micro Focus

Network Printing Problems

Articles and Tips:

Mickey Applebaum

01 Feb 1998


Editor's Note: This monthNetWare Connection introduces a new column called "Technically Speaking," which will answer your technical questions. To submit a technical question for future columns, send an e-mail message to nwc-editors@novell.com. You can also fax your question to 1-801-228-4576.

Users frequently have problems printing from a Windows 95 workstation to a printer on an intraNetWare or NetWare network. To correct these problems, you must be familiar with the print services that are available on a Windows 95 workstation, and you must be familiar with how these print services handle print jobs.

When you add a printer from the Windows 95 Control Panel, you can configure the printer as a local printer or as a network printer. Because the termnetwork printeris vague, some users have difficulty deciding which option to select. Windows 95 defines a network printer as a printer that uses Microsoft's File and Print Services to communicate on the network. As a result, the network printer option is optimized for File and Print Services.

Because the network printer option is optimized in this way, it can cause problems if you use NetWare print services. These problems are caused by the way in which Windows 95 manages print jobs sent to a printer that is using File and Print Services.

FOLLOW THAT PRINT JOB!

When you send a print job from a Windows 95 application to a network printer, the print job is captured by the Windows 95 spooler, enabling the application to print a document more quickly than if this application were printing directly to the printer. As the print job is being received, the Windows 95 spooler redirects the print job to a temporary redirection file in the workstation's TEMP directory. (The default directory path is C:\WINDOWS\TEMP. You can define a different directory path in the workstation's AUTOEXEC.BAT file.) After the entire print job has been redirected to this file, the Windows 95 spooler initiates a lookup request for the destination printer port.

The network manager, another Windows 95 process, then forwards the temporary redirection file to the TEMP directory on the workstation that hosts the printer. Finally, the Windows 95 spooler on that workstation opens the temporary redirection file and passes the print job to the printer itself.

Unlike Windows 95 applications, many DOS applications are designed to communicate directly with the destination printer port or through BIOS. When you are running a DOS application on a Windows 95 workstation, however, the Windows 95 spooler captures print jobs sent from this application and redirects them to the TEMP directory. This capability allows you to print documents from both Windows 95 and DOS applications in a File and Print Services environment.

Because NetWare print queues are not File and Print Services resources, the Windows 95 spooler cannot communicate directly with these print queues. When the Windows 95 network man-ager tries to communicate with a NetWare print queue, the print queue doesn't send the same response as a File and Print Services resource would send. As a result, the Windows 95 network manager may cut off communications with the printer, resulting in print jobs that are corrupted, incomplete, or lost.

This incompatibility can also cause the workstation to lose access to the printer. When communications with the NetWare print queue fail, the Windows 95 network manager returns an error to the Windows 95 spooler, which assumes the print job could not be completed because the printer is unavailable. The printer's status is then changed to Work Offline, and you must manually reset this status if you want to continue using the printer.

THE QUICK FIX

Solving the problems associated with printing from a Windows 95 workstation to a NetWare print queue is simple. By adding a CAPTURE command to a login script, you can configure the workstation to use NetWare print services, rather than Windows 95 print services. Using NetWare print services can dramatically reduce network printing problems.

To configure a Windows 95 workstation on an intraNetWare or NetWare 4 network to use NetWare print services, you place a CAPTURE command in a container, profile, or user login script. You can decide which login script should include the CAPTURE command, depending on how you have set up the network. For example, you could place the following CAPTURE command after the drive and search mappings in a container login script:

#CAPTURE NB NT NFF TI=45 Q=full distinguished print queue object name L= LPT port number

In this example, the NB option prevents a banner from being printed for each print job. The NT option, on the other hand, allows print jobs to use Byte Stream mode, rather than Tab Expansion mode. As a result, binary information is transferred directly to the printer. This option is useful if you are printing graphics and specialized fonts, such as PostScript fonts.

Finally, the NFF option prevents a blank page from printing at the end of a print job, and the TI option determines how many seconds the NetWare print queue should remain idle before assuming that the entire print job has been spooled to this print queue and is ready to be sent to the printer. The TI option is used only when the Windows 95 or DOS application doesn't send a proper End of Job message at the end of a print job.

You replacefull distinguished print queue object namein this example with the full distinguished name of the Novell Directory Services (NDS) object that represents the appropriate NetWare print queue. You replaceLPT port numberwith the number of the local printer port you are using.

The CAPTURE command for intraNetWare and NetWare 4 requires the NetWare print queue object's full distinguished name. You do not have to know the name of the server on which this print queue resides, and you do not have to log in to the server to access the print queue. When the login script containing the CAPTURE command runs on your workstation, NDS determines the server on which the NetWare print queue resides and authenticates you to this server. You can then access the NetWare print queue.

Using the NetWare print object's full distinguished name, rather than the name of the server on which the print queue resides has another benefit: Because the CAPTURE command is not server specific, you don't have to change the command if you move the NetWare print queue to another server in the same context.

CAPTURE Command for NetWare 3

Unlike the CAPTURE command for intraNetWare and NetWare 4, the CAPTURE command for NetWare 3 requires the name of the server on which the NetWare print queue resides. To configure a workstation on a NetWare 3 network to use NetWare print services, you place a CAPTURE command in the system or user login script (depending on how you have set up your company's network). For example, you could place the following CAPTURE command after the drive and search mappings in a user login script:

#CAPTURE NB NT NFF TI=45 Q=print queue name S=server name L=LPT port number

You replaceprint queue namewith the name of the NetWare print queue you want to service this workstation's print jobs, and you replaceserver namewith the name of the server to which the workstation is attached. (You don't have to include the server name if the network contains only one server.) In addition, you replaceLPT port numberwith the number of the local printer port you are using.

With NetWare 3, you can use a CAPTURE command to capture only the LPT1, LPT2, and LPT3 ports. Of course, Windows 95 allows you to use up to the LPT9 port for a local printer and to create permanent printer assignments within Network Neighborhood. (A permanent printer assignment enables the workstation to connect to the printer without requir-ing a CAPTURE command.) However, I don't recommend using permanent printer assignments: Because you cannot use the CAPTURE command with a permanent printer assignment, you cannot define particular NetWare print queue options via this command. As a result, you must use the default options.

New Printer Definitions

After you have created a CAPTURE command for all of the NetWare print queues a workstation needs to access, you delete the existing network printer definitions from the Printers folder in the Windows 95 Control Panel. You then restart the workstation and log in to the network, ensuring that each CAPTURE command executes properly. To check CAPTURE commands, you open a DOS box on your workstation and enter the following command at the DOS prompt:

CAPTURE /SH

A list of CAPTURE commands appears. If this list does not contain all of the CAPTURE commands that you created, you should carefully check the login scripts that include these commands. For example, a CAPTURE command would not execute if you entered the full distinguished name of the NetWare print queue object incorrectly.

You must then complete the following steps to create a new printer definition for each printer and to disable the Windows 95 spooler:

  1. From the Windows 95 Control Panel, double-click the Printers folder, and double-click on the Add Printer icon.

  2. The Add Printer wizard appears, guiding you through the process of creating a new printer definition. When you are prompted to specify whether the printer is a local printer or a network printer, select the Local Printer option.

  3. Continue defining the printer by selecting the appropriate printer manufacturer and model and by selecting the LPT port that you included in the CAPTURE command. (Select this LPT port even if you are given the option of selecting a UNC-defined port.)

  4. After the printer definition has been created, a new printer icon appears in the Printers folder. Right-click on the printer icon, and select the Properties option. Then select the Details tab.

  5. The Details page appears. The Print to the Following Port field should contain the LPT port that you included in the CAPTURE command, followed by the NetWare print queue object's full distinguished name in parentheses (or the complete context of this print queue if it resides on a NetWare 3 server). For example, this field might contain the following:

    LPT2: (\\HOUSE\.LASERJET.KRCL)
    

    In addition, the Print Using the Following Driver field should contain the name of the appropriate printer driver for the printer you are using.

  6. If these settings are correct, select the Spool Settings button.

  7. The Spool Settings box appears. By default, the Spool Print Jobs So Program Finishes Printing Faster option is enabled. This option prompts the Windows 95 spooler to redirect print jobs to the workstation's TEMP directory before the CAPTURE command can redirect these print jobs.

As a result, several problems can occur if you keep the default option. For example, if the TEMP directory did not exist, the Windows 95 spooler might discard print jobs. In addition, the Windows 95 spooler might change the data in the print job before forwarding it to the NetWare print queue. Finally, the Windows 95 spooler might not redirect print jobs sent by DOS applications.

To prevent these problems, select the Print Directly to the Printer option, which prompts the Windows 95 spooler to pass print jobs directly to the NetWare print queue. As a result, print jobs remain unchanged.

CONCLUSION

By setting up your company's printers in this way, you can resolve some existing network printing problems and prevent many problems from occurring in the future. Because network printing problems are so prevalent, completing the steps outlined in this article can improve network efficiency and make your job easier.

Mickey Applebaum has worked with NetWare for 14 years. You can reach Mickey at mickey@homein.salt-lake-city.ut.us.

* Originally published in Novell Connection Magazine


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates