next up previous contents
Up: Technical Talk Previous: X Windows / Motif

Subsections


Printers and Plotters

This section discusses some of the problems associated with the printing/plotting of FEMGV plot files.

HP-GL/1 Plotfiles

These plotfiles are simply ASCII text files and they may be sent to your plotter using your local print facility. If you need to send an HP-GL/1 file to an HP-PCL printer, the LaserJet III for example, then you will either have to firstly select HP-GL mode by pressing the appropriate button on the printer, or edit the plotfile as follows:

   esc E        ! reset
   esc &l1O     ! landscape mode
   esc %0B      ! Enter HP-GL mode
   .......
   .......      ! the HP-GL plot file
   .......
   esc %0A      ! Back to PCL mode
   esc E        ! reset and flush


   where esc is ASCII 27

The text from ! to the end of the line is just a comment and must NOT be typed in to the plotfile.

So, on a PC, for example, you could create HPGL.HDR which contains the first 3 lines and HPGL.TRL which contains the last 2 lines. Then create PRINTHPGL.BAT containing

   COPY/B HPGL.HDR+%1+HPGL.TRL LPT1:

So to print FVPLOT.DAT you would type

   PRINTHPGL FVPLOT.DAT

HP-GL/2 Plotfiles

Once again these plotfile are ASCII text, but they usually contain the commands for switching from HP-PCL to HP-GL mode and so no further action is required. See Chapter 11.5.2.1 for details of the AutoSwitch resource.

HP-PCL Plotfiles

These are the plotfiles produced by the PAINTJET, DESKJET and LASERJET drivers. Generally speaking they are in binary format and so they required special care when sending them to the output device.

On VAX/VMS systems these plotfiles are ASCII text but they must be printed using the PASSALL option.

   PRINT/PASSALL/QUEUE=LASERJET FVPLOT.DAT

for example.

On the UNIX machines and the PC the file is in binary format and must be sent to the printer in such a way that no interpretation of control characters is performed.

The stty command may be used in order to condition the printer port. For example, the stty setup used on the Silicon Graphics machine at Femsys Ltd is:

speed 9600 baud; line = 1;
intr = DEL; quit = ^\; erase = ^H; kill = ^U; eof = ^A; eol = ^@;
swtch = ^@; lnext = ^V; werase = ^W; rprnt = ^R; flush = ^O;
stop = ^S; start = ^Q;
-parenb -parodd cs8 -cstopb hupcl cread clocal -loblk -tostop
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
-icrnl -iuclc
ixon -ixany -ixoff
-isig -icanon -xcase -echo -echoe echok -echonl -noflsh
-opost -olcuc -onlcr -ocrnl -onocr -onlret -ofill -ofdel

The most important option is -opost which disables all output post-processing.

Alternatively, a printcap entry such as

# HP Laserjet III connected by serial line
#
hpiii:\
   :lp=/dev/ttya:br#9600:ms=raw,-crtscts,ixon,ixoff:\
   :sh:sf:sd=/usr/spool/lpd:
#
#   ms=raw allows escape characters to be passed unchanged
#   sh supress burst page header
#   sf supress form feeds
#
#   Printer settings:  9600 baud
#                      no parity
#                      8 data bits
#                      1 stop bit
#                      xon/xoff handshaking
#

could be used.

On the PC simply use COPY/B filename LPT1:

HP Laserjet Printers

The earlier printers in the Laserjet Family have a severely limited amount of memory available for graphics data - 59Kb per page for the Laserjet and 395Kb per page for the Laserjet+, Laserjet 500+ and Laserjet II, for example.

If your printer runs out of memory whilst trying to print a FEMGV plotfile - usually indicated by an Error 20 or Error 21 - you should try recreating the plot at a lower resolution. If you are already working at 150dpi then an alternative solution is to install additional memory. (Additional memory is available from your Hewlett-Packard Sales Representative.....)


next up previous contents
Up: Technical Talk Previous: X Windows / Motif

Femsys Limited
9/10/1999