Geoff Chappell - Software Analyst
Print spooling is a technique for deferring the sending of data to a printer. The intention is that the application program that initiated the print job can get on with whatever other things it was designed to do rather than wait for the communication of typically large amounts of data from the computer to the printer. To make print spooling work, temporary files must be created to hold all the information that is needed for the print job. From time to time and preferably when it has the least impact on the user’s perceptions of the system’s performance, a process that runs in the background reads information from the temporary files and sends data to the printer, over and over until the job is done.
A print job may generate too much data to be stored in temporary files on whatever drive (or drives) the print spooling system happens to be using for these temporary files. The user is notified of the problem, but it is not obvious either:
In Windows 95, the local directory that the print spooler uses for temporary files is not configurable. Close inspection of the Microsoft Knowledge Base may some day reveal an article in which Microsoft states this limitation and names the preset directory. Without such information, users have little hope of divining the best way forward if their print jobs fail due to insufficient free disk space.
Windows 95 offers two forms of print spooling. In one, the information in the temporary files is the raw data that is sent to the printer. In the other, each temporary file is an enhanced metafile (EMF) that contains instructions for computing raw data. These two methods are called RAW and EMF respectively. Knowledge of these methods may help a user to get a print job completed on systems where sufficient free space is not available at the location that the print spooler insists on.
In both methods, the spooler creates shadow files (with the SHD extension) and spooler files (with the SPL extension) in a particular directory. The local directory that the Windows 95 Local Print Provider (implemented in SPOOLSS.DLL) uses for these files is necessarily the SPOOL\PRINTERS subdirectory of the Windows directory. This directory is the sole place that SPOOLSS looks for files with the SHD and SPL extensions. The directory is not configurable.
The SPOOLSS version inspected for this note is from Windows 95. This note appears to apply also to the version from Windows 98, and presumably also to intermediate releases. Details such as file sizes, time stamps and known distribution packages are given in the following table.
|Version||Size||Date and Time||Package|
|4.00.950||91,136||09:50, 11th July 1995||Windows 95|
|4.10.1998||118,784||20:01, 11th May 1998||Windows 98|
With raw spooling, each SPL file holds the raw data for the print job. These SPL files must be in the SPOOL\PRINTERS subdirectory of the Windows directory. The drive that contains the Windows directory must therefore have enough free disk space for all the raw data that is to be sent to the printer as part of the print job. Otherwise, printing fails.
If the user of a system configured for raw spooling cannot make sufficient free space on the drive that holds the Windows directory, then it may still be possible to print by reconfiguring for EMF spooling.
An EMF may be considered as an intermediate stage in the generation of raw data for the printer. The EMF method therefore defers not just the sending of data to the printer but also some of the work involved in calculating what data to send. This means that EMF spooling gives the advantage of a faster return to the application that initiated the printing. Less work is done in the foreground. More work is done in the background. The disadvantage is that each EMF is typically larger than the raw printer data it corresponds to, so EMF spooling tends to require more free disk space for the temporary files.
With EMF spooling, each SPL file is a list of enhanced metafiles used for the job. The SHD and SPL file for a print job are still necessarily in the SPOOL\PRINTERS directory but they are typically small. In contrast, the possibly many metafiles may have a large total size, usually much greater than the raw data that would be stored as the SPL file for raw spooling, but they may be elsewhere, typically in the directory given by the TEMP environment variable.
Thus, users who are told that there is insufficient disk space for printing may have some options. If they are using RAW spooling, then although a change to EMF spooling will typically require more disk space overall for temporary print files, the overwhelming bulk of data in these files can be configured to go to some drive other than the one that holds the Windows directory.