Printing Graphic Images with SST

In order to print a SST plot an appropriate graphics file must first be created and sent to the printer. SST supports both HP Laserjet and PostScript printers. The graphics output for these devices is determined by the value of the TERM subop. The addition of TERM[jet+] to a graphics command in SST will cause HP Laserjet plus output to be generated whereas the addition of TERM[psc] will cause post-script output to be generated. The output for these devices is of little use when sent to the screen, so by default the output is placed in a file `sstplt.jet' or `sstplt.psc'. The naming of these files is controlled by the FILE subop.

The PostScript output files (from TERM[psc]) contain simple ASCII text and may be copied directly to a PostScript printer. For example, to copy the output from SST MS-DOS (or any other SST version) to the Laserwriter, one might say:

copy sstplt.psc com1:

The output from the TERM[jet+] depends on the system under which SST is executed. Under MS-DOS, where memory is tight, a device independent format is written into the file sstplt.jet. The contents of this file are binary codes which need to be post-processed using the standalone driver `sstjet.exe'. `sstjet.exe' is provided with the MS-DOS distribution of SST. To use this filter you may use standard MS-DOS redirection. For example, to send the device independent output contained in sstplt.jet to a Laserjet printer attached to com1:, one might say:

sstjet < sstplt.jet > com1:
The post-processing done by sstjet.exe sends the appropriate graphics commands to the Laserjet printer.

Under all other environments, including SST-386 running in protected mode under MS-DOS, the contents of sstplt.jet will be the actual graphics commands required to drive the Laserjet printer. This file must be copied to the printer as a binary file. For example, to copy the output from SST-386 to a Laserjet printer connected to a parallel port, one might say:

copy/b sstplt.jet lpt1:

To make this all a bit simpler, SST will attempt to send its graphics output directly to the printer when the subop PRINT is added to the graphics line. With SST under MS-DOS, the default is to automatically invoke the `sstjet.exe' program; this causes the intermediate device independent output to be processed and sent to device PRN.

The default printing command can be overridden using the SSTPRT environment variable. If set, this variable should contain the name of a program which accepts graphics output and processes it appropriately. The format of the graphics output is determined by the graphics terminal type (set by the TERM subop).

For example, in the SST-386 distribution, we include the DOS batch file SSTJET.BAT which contains:

copy/b %1 lpt1:
When the PRINT option is added to a graphics command under SST-386, the resulting graphics output will be copied to the printer provided the environment variable SSTPRT is set to "sstjet". In the example above we have used a binary copy since the output from the Laserjet driver is again in binary.

It is also possible to redirect SST graphics output using the FILE[] subop. When permissions are set so that users may write directly to devices (e.g., under MSDOS or on your own work-station), it is possible to use:

scat var[sr] parm[c] term[psc] file[/dev/lpt1]
or
scat var[sr] parm[c] term[jet+] file[com1]

Examples

  1. Under VMS, define the environment variable SSTPRT to be the program sstprt.com which contains the single line:
    $ imprint/ultrascript 'p1
    
    This causes graphics images to be automatically sent to an Imagen PostScript laserprinter. In this case we need to define the graphics type to be PostScript (using TERM[psc]).

  2. On a Sun 4/280 we set the environment variable SSTPRT to be lpr -h to avoid the printing of the header page.


Fortran Back