Notes on Printing from UNIX Workstations

 

Use File, Print Setup to choose whether the printed output will be bitmap, PostScript, or HPGL format. The default is the bitmap format created by the UNIX xwd command. PostScript and HPGL format are discussed in separate sections in this chapter.

 

DADiSP creates an image file when you use the Print options available in the File pull-down menu. The image file is named Xdsppic.nnn, where nnn = 000 for the first print of the session, nnn = 001 for the next print of the session, etc.. DADiSP automatically increments the Xdsppic filename by one with each print. To conserve disk space, you may want to delete these files after printing them.

 

To send the Xdsppic.nnn image file to the printer, use the UNIX xpr command. For example:

 

 xpr Xdsppic.000 - device ljet -output /dev/rp

 

formats Xdsppic.000 for an HP Laserjet printer, and sends it to the printer via /dev/rp.

 

DADiSP uses the UNIX xwd command to create the image file of the DADiSP Application Window. If you have opted to print an individual Window, DADiSP will display just that Window prior to the call to xwd. The format of the internal DADiSP command is:

 

 xwd -name %s -out %sspc.%03d -nobdrs

 

The substitutions in this command are as follows: %s -> DADiSP, %s -> Xdsp, and %03d -> integer number of file. Example:

 

 xwd -name DADiSP -out Xdsppic.002 -nobdrs

 

If you want to set alternative arguments for the xwd call, set the new command string in the configuration parameter DSP_XWD_FORMAT. Note that whatever you use must include the three arguments which DADiSP will pass (%s, %s, %03d), in this order.

 

An alternative is to create a macro or SPL function which will automatically copy the file to your printer queue. For example:

 

 _SPOOLPRN(fn) RUN(strcat("lpr ", fn, "; rm ",fn),-1)