xcall SPOOL, file {,printer {,switches {,copies {,form {,lpp {,width {,prefix {,suffix {,overlay {,totpages}}}}}}}}}}
Parameters
file (String)
is the specification of the file to print, and is the only required parameter.
printer (String)
is the name of the printer to send the file to. If not specified, the default defined by the PRINTER statement of the miame.ini file will be used. In most cases, the printer name should correspond to a printer initialization file with a matching name, either SYS:<printer>.INI or ASHCFG:<printer>.PQI. The exceptions to this rule are as follows.
Under Windows, you may specify the pseudo printer name “PROMPT”, which is interpreted as a printer whose initialization file contains the following:
DEVICE = PROMPT:
PASSTHROUGH = OFF
PITCH = AUTO
If the name you specify is longer than 6 characters (which was the maximum for AMOS printer names and remains the maximum for A-Shell printers which have corresponding initialization files), then it is interpreted like the PROMPT example above, except with the DEVICE set to the name you specify. (This “implied printer” technique can be taken to its logical extreme by specifying a \\machine\sharename name for the printer, in which case there does not even need to be a local printer driver definition.)
Under UNIX, if you specify a printer name which has no corresponding initialization file, then it is treated as if the initialization file were simply:
DEVICE = <printer>
Refer to the printer configuration documentation for more information about printer initialization files.
switches (Num)
may be any combination of the following:
|
Value |
Equivalent PRINT.LIT switch |
|
&h000001 |
BANNER (applies only to UNIX, if at all) |
|
&h000002 |
NOBANNER |
|
&h000004 |
DELETE |
|
&h000008 |
NODELETE |
|
&h000010 |
HEADER (ignored by A-Shell) |
|
&h000020 |
NOHEADER (ignored by A-Shell) |
|
&h000040 |
FF (formfeed after printing) |
|
&h000080 |
NOFF |
|
&h000100 |
WAIT (ignored by A-Shell) |
|
&h000400 |
INFORM (ignored by A-Shell) |
|
&h000800 |
KILL (ignored by A-Shell) |
|
&h002000 |
PASSTHROUGH (Windows only) |
|
&h004000 |
NOPASSTHROUGH (Windows only |
|
&h008000 |
LANDSCAPE (Windows only); see Note 2 below |
|
&h010000 |
NOLANDSCAPE (Windows only); see Note 2 below |
|
&h080000 |
Force Preview on; see Note 3 below |
|
&h100000 |
Force Preview off; see Note 3 below |
|
&h400000 |
Force APEX Preview on; see Note 3 below |
Notes:
• Any switches specified this way will override the corresponding switches in the printer’s initialization file.
• Note that the while the LANDSCAPE switch will force landscape mode regardless of the orientation currently set in the printer driver’s properties, this is not currently true of the NOLANDSCAPE switch. In other words, if the user changes the printer’s orientation to landscape in the printer properties then A-Shell will not be able to change that. But as long as the printer driver’s orientation is left at portrait, A-Shell will be able to print in either portrait or landscape mode. The only point of the NOLANDSCAPE switch then is to override the ORIENTATION=LANDSCAPE statement in the printer init file.
• In the standard Windows GUI environment, the Force Preview On switch (&h080000) will use the GUI-mode APEX previewer rather than the EZVUE text-mode version. But in the case of a telnet connection to a server, the default is to preview the file using EZVUE on the server side, unless the Force APEX Preview switch is set. Set both switches to automatically use APEX whenever applicable, and to fall back to EZVUE otherwise.
copies (Num)
is the number of copies to print (default 1).
form (String)
is the form name. Note that names are not generally used in the Windows or UNIX world and are thus ignored by A-Shell. To get the equivalent effect, you would probably define multiple logical printers associated with a single physical printer.
lpp (Num)
is the number of lines per page (ignored).
width (Num)
is the number of columns per page (ignored).
prefix (String)
specifies the name of a file to be prepended to the front of the printfile before sending it to the printer. This is useful for sending printer initialization codes or routing instructions.
suffix (String)
specifies the name of a file to be appended to the end of the printfile.
overlay (String)
specifies the name of an overlay file. This has the same affect as setting OVERLAY= in the printer init file, but any overlay specified in the XCALL statement will override an overlay in the printer init file.
totpages (Num)
This parameter, which works only in the Windows GDI printing environment, specifies the number of pages in the printout. If specified, any occurrence of "%#" in the printfile will be replaced with the total number of pages. For example, a string in the printfile of the form "Page 1 of %#" would be converted to "Page 1 of 100", assuming that the total pages had been set to 100. Obviously you could have done this directly in your application, but it is often difficult to know in advance how many pages you are going to generate, whereas it is easy to count them as you generate them and then pass the total to SPOOL/EZSPL.name of a file to be appended to the end of the printfile.