PASSTHROUGH = <Boolean>
(Windows only) This command applies only to A-Shell/Windows, and has valid values of ON or OFF (or YES/NO, TRUE/FALSE, etc.) with a default of ON. The terminology is somewhat confusing, so it may be better to think of the two options as follows:
• "GDI Mode" (PASSTHROUGH=OFF)
• "RAW Mode" (PASSTHROUGH=ON) (default)
Windows applications normally use "GDI Mode", meaning they print via the Windows Graphic Device Interface (GDI), which in turn routes text and logical commands through the printer driver to produce text and graphic output on the printer device. GDI mode has several advantages:
• Device Independence – the GDI presents a single, reasonably consistent virtual printer interface to the application, while the printer drivers supplied by the printer manufacturers take care of the problem of making the printer act accordingly. The ideal of device independence is limited, however, in the real world, by the differing capabilities of physical printers. But as long as we are dealing with laser or ink jet devices, i.e. "raster" printers that can address individual pixels, and we don’t get too exotic, we can expect reasonable uniformity.
• Easy font selection using the Windows font mapper and font rendering facilities, without having to worry about which fonts are internal to the printer.
• Automatic font sizing via the PITCH=AUTO and CPP / LPP options in the printer initialization file.
• Easy methods of producing graphic output (lines, rectangles, circles, images) using a set of high level, human readable text commands.
• Ability to select arbitrary colors using the RGB system.
• GDI printing is the only way you can print to the new breed of low cost "Windows only" printers (which includes most inexpensive ink jet printers.)
The following printer initialization commands are limited to GDI mode only: FONT, WEIGHT, CHARSET, CPP, LPP, FONTHEIGHT, FONTWIDTH, PITCH, TMARGIN, LMARGIN, and ORIENTATION (and possibly others.)
Therefore, GDI mode (PASSTHROUGH=OFF) would in most cases be the preferred approach. However, this method is substantially different in style from the way traditional AMOS applications print, which is much closer to RAW mode. Most importantly, GDI mode does not support the use of embedded escape sequences within the print file to set printer features (such as condensed print), which is common in applications being ported from AMOS. (This is the main reason why RAW mode, i.e. PASSTHROUGH=ON, is the default.) Another factor in the decision to make RAW mode be the default is that the vast majority of AMOS reports are "plain text", and a fair percentage of them are specifically intended for dot matrix printers with tractors (often with pre-printed forms.) For these kinds of print applications, most of the features of GDI mode are not only irrelevant, but they can get in the way. (And, RAW mode is certainly faster and more efficient, since it eliminates the need to "render" or "rasterize" the text, and greatly reduces the amount of data that must be sent down the wire to the printer. However, with the speed of modern PC’s, this may not be much of an issue any more.)
As you might suspect, RAW mode printing (PASSTHROUGH=ON) is not very common in the Windows world. In fact, most printer drivers don’t even support it (and as mentioned above, neither can many physical printers, regardless of the driver.) Fortunately, there is a generic driver present on virtually all versions of Windows from W95 and up, which does support PASSTHROUGH printing (provided the printer hardware supports it.) It is listed under the manufacturer name "Generic" and model name "Text Only". You should use this driver whenever using RAW (PASSTHROUGH=ON) mode printing.
PASSTHROUGH (raw mode) is required in the following cases:
• Whenever the print file contains ESC codes into the printfile to access features of a specific printer (such as condensed print)
• For all PCL reports containing PCL or Postscript commands
Notes
When using PASSTHROUGH=ON, it is sometimes necessary to set the "spool format" for "RAW" (instead of the default, "EMF".). To accomplish this, click the Start button, then Settings, then Printers, and then right click on the printer icon(s) you are using with A-Shell. Click Properties, click on the Details tab, and then the Spool Settings button. Finally, change the Spool Data Format to RAW. For network printing, it may be necessary to do this for both the local and remote printers. The symptom of not doing this when it is needed is that when you print, you may hear the printer "hiccup" but nothing comes out.
Although one generally settles on either PASSTHROUGH=ON or PASSTHROUGH=OFF for a particular printer, it is possible to override the PASSTHROUGH setting established in the printer initialization file. One way is to use the PASSTHROUGH and NOPASSTHROUGH flags in the SWITCHES parameter to XCALL EZSPL or to use the /PASSTHROUGH or /NOPASSTHROUGH switch with PRINT.LIT. Another is to embed the command in the print file itself, since PASSTHROUGH is one of the printer init file commands that has a GDI Printing Directive Equivalent.
Some printer drivers, typically lasers, even support the ability to send raw escape sequences—i.e. passthrough—even when otherwise in GDI—non-passthrough—mode, through the use of a special GDI //ESCAPE directive.