Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!wpowz.enet.dec.com!zambotti From: zambotti@wpowz.enet.dec.com (Walter Zambotti DEC) Newsgroups: comp.unix.ultrix Subject: Re: HP plotter printcap, LAT Message-ID: <1991Jun12.021817.11000@tkou02.enet.dec.com> Date: 12 Jun 91 02:18:17 GMT References: <1991Jun11.200000.12323@msuinfo.cl.msu.edu> Sender: usenet@tkou02.enet.dec.com (USENET News System) Reply-To: zambotti@wpowz.enet.dec.com (Walter Zambotti DEC) Organization: Digital Equipment Corporation Lines: 93 I don't known specifically about the HP 7500 plotter. But I have a printcap for the HP draftmaster series which is a HPGL plotter. Here is the printcap : -----------------------printcap------------------------ # @(#)printcap 3.1 (ULTRIX) 4/20/90 lp|plotter:\ :af=/usr/adm/lp1acct:\ :br#9600:\ :ct=lat:\ :if=/usr/lib/lpdfilters/hpglif %D:\ :lf=/usr/adm/lp1err:\ :lp=/dev/tty13:\ :op=SERVER_PORT_NAME:\ :os=:\ :sd=/usr/spool/lpd1:\ :ts=SERVER_NAME:\ :sh:\ :sf:\ :fc#0177777:\ :fs#06023:\ :Da=hpgl01:\ :uv=4.0: ------------------------------------------------------------- Notice the capabilities if, Da and uv. These are not required if your plotter automatically selects xon/xoff mode or if your plot files explicitly turn on this feature. If like the draft master it doesn't then you'll need these capabilities and this additional input filter routine : -----------------------hpglif.c-------------------------------- include char FormPath[80] = "/usr/lib/lpdfilters/forms/" ; main(ArgCnt, ArgList) int ArgCnt ; char *ArgList[] ; { char Chr, *strcat() ; FILE *Form ; if(ArgCnt == 2) { if((Form = fopen(strcat(FormPath, ArgList[1]), "r"))) { while((Chr = fgetc(Form)) != EOF) { putchar(Chr) ; } fclose(Form) ; } } while((Chr = getchar()) != EOF) { putchar(Chr) ; } } ----------------------------------------------------------------- Place this executable if the place specified by the "if" cap. And create a directory called : /usr/lib/lpdfilters/forms/ and place a file in this directory as specified in the "Da" cap. : hpgl01 In this file place the escape code to turn xon/xoff mode for the plotter. This file will be set to the plotter prior to every plot file. You can create many different form files and place them in the forms directory and specify which one you would like to be sent to the plotter by using the "-Dform" switch on the lpr(1) command. Like : lpr -Pplotter -Dhpglonoxon file ... Of course you must create the file "hpglnoxon" in the forms directory. I use vi to create my form files. Lastly I use this HPGL escape code to turn on xon/xoff mode : ^[.P1 Which is : ESCAPE . P 1 followed by newline. Walter