SUMMARY: HP III with postscript (LONG)

From: Erik M. Bataller (bataller@sol.acs.uwosh.edu)
Date: Tue Mar 30 1993 - 12:19:41 CST


Hello Fellow Sun People,

        This is a summary for my post requesting printcap entries
because I was having difficulty printing. My configuration is
an HP III with a postscript cartridge and NeWSprint 2.0. My problem
was that some bigger files choked and caused: 22 I/O CONFIG ERR on
the HP without the postscript cartridge. With it the printer and
computer couldn't communicate at all.

Below I have included my current printcap and some of the replies.

Well, I received a lot of replies and requests for info.
There is a lot of redundancy in the replies so I will basically
summarize and include a few of the ones that were a bit more meaty
than just the printcaps.

As it turned out for me, my problem was not with my printcap
but with my print cable. The pin which allowed the HP to tell the
computer to hold off(xon/rtscts) was disconnected. I should have
checked earlier, however, it was not so clear that that was the problem
and some things were working. It did end up being a very good learning
experience although it took too long. I was initially going to
recommend just using the NeWSprint stuff and forgetting the postscript
but now I am not so sure. It is faster but there are some issues about
it which I have found dissatisfactory. It turns out that the NeWSprint
does not implement text printing exactly like lp and lpr and has there-
fore caused some frustration for those who want to stick to standard
UNIX syntax and what-not. I thought with the writing of some simple
scripts and/or aliases I could mimic it but I have yet found an easy
way to do this.

When printing a standard text file NeWSprint uses the standard
HP font, Courier 10, and this causes not-so-nice looking text. It
also appends a header to the to, unless you tell it not to, and
therefore shifts everything down. For instance, manpages no longer
fit nicely on to a page and take more fiddling than I find necessary.
I therefore became disgruntled with NeWSprint. A lot of the folks
here use the command: lpr -p filename. Well, with NeWSprint thinking
the printer is postscript it prints with Times roman as the default,
a bit small, but it also places a nice "normal" header on the files
and allows them to fit nicely on a page. To do somewhat the same
thing with NeWSprint I was inclined to use enscript and I had to give
it the font and what not and tell it not to print a header and it came
out OK. However, the header is nice and useful but NeWSprint insists
on appending one and this forces everything to shift down and not fit.
I tried using NPtoool and found that it lacked any features(i.e. it
didn`t allow the setting of font, header, page length, etc.). I have
heard that NeWSprint 2.1 is nicer but I don't currently have it. I
therefore, recommend using the postscript install/printcap entry and
using a postscript printer or an HP(or whatever) with a cartridge. It
also turns out that NeWSprints interpretation of postscript isn't so
standard and you will probably find some things cause "offending-errors".

Some also suggested using an rs-422 cable and setting on the
printer. It works with rs-232 but I will be trying rs-422 to see
if there are any differences.

Sorry I didn't respond directly, Thanks VERY much for all your help.
If you have any comments or suggestions about my summary I will
gladly append or edit anything. Please send me any additional
info or corrections about this, I will update it and send the corrections
through. If you know how to make NeWSprint not change
the standard UNIX printing environment please inform.

Erik

MUCH THANKS to:

pjm@cshl.org(PatMonardo)
adam%bwnmr4@harvard.harvard.edu(AdamShostack)
spomush@usops.amgen.com(StevePomush)
coez@tet.uni-hannover.de(CengizOezcan-Barlach)
haiml@msil.sps.mot.com(LeibHaim)
poul@nilu.no
fred@petadmin.wustl.edu(FredG.Kuhns)
lem@usb.ve(LDC-LuisE.Mun~oz)
shandelm@jpmorgan.com(JoelShandelmanFIMSInformationSystems-212-648-4480)
rojielyn@ocga-sun.UCSD.EDU(RojielynnArcega)
cgates@fnoc.navy.mil(CraigGates)
manish@prentice.com(ManishBhatia)
Stuart.Roe@ncl.ac.uk(StuartRoe)
rshouman@chpc.utexas.edu(RadeyShouman)
jgw@hprnd.rose.hp.com(JimWendt)
"SusanThielen"<thielen@irus.rri.uwo.ca>
rickn@copley.com(RichardJ.Niziak)
andrews@erin.gov.au(AndrewScarman)
"RoyS.Hallquist,Jr."<rhallqui@rigel.uark.edu>
SteveKao<k@hprnd.rose.hp.com>
SteveKao<k@hprnd.rose.hp.com>
louie@seismo.unr.edu(JohnLouie)
poul@nilu.no
eeikhey@eeiua.ericsson.se(KevinHeagney)
prusk@rosco.Central.Sun.COM(PaulRusk[SunDenverSystemEngineer])

Erik

!! Erik M. Bataller | Phone: (414) 424-0347 | Univ. of Wi., Oshkosh
!! Academic Computing Services | 800 Algoma Blvd., 307 Dempsey,
!! Oshkosh, Wi. 54901-8602 | Internet: Bataller@sol.acs.uwosh.edu
!! Bitnet: Bataller@oshkoshw.bitnet

-----BEGIN INCLUDED FILES

 

################################################################
# entry for a PostScript printer on a serial port
################################################################
ps|ps, a PostScript printer printer:\
        :lp=/dev/ttya:\
        :sd=/var/spool/ps:\
        :lf=/var/spool/ps/log:\
        :af=/var/spool/ps/acct:\
        :if=/zamboni0/newsprint/lpd/if:\
        :gf=/zamboni0/newsprint/lpd/gf:\
        :nf=/zamboni0/newsprint/lpd/nf:\
        :tf=/zamboni0/newsprint/lpd/tf:\
        :rf=/zamboni0/newsprint/lpd/rf:\
        :vf=/zamboni0/newsprint/lpd/vf:\
        :cf=/zamboni0/newsprint/lpd/cf:\
        :df=/zamboni0/newsprint/lpd/df:\
        :of=/zamboni0/newsprint/lpd/of:\
        :mx#0:\
        :sf:\
        :sb:\
        :br#19200:\
        :rw:\
        :fc#0000374:\
        :fs#0000003:\
        :xc#0:\
        :xs#0040040:
################################################################
# entry for an HP LaserJet III NeWSprint printer on a serial port
################################################################
hp|hp, a HP LaserJet III printer:\
        :lp=/dev/ttya:\
        :sd=/var/spool/hp:\
        :lf=/var/spool/hp/log:\
        :af=/var/spool/hp/acct:\
        :if=/zamboni0/newsprint/lpd/if:\
        :gf=/zamboni0/newsprint/lpd/gf:\
        :nf=/zamboni0/newsprint/lpd/nf:\
        :tf=/zamboni0/newsprint/lpd/tf:\
        :rf=/zamboni0/newsprint/lpd/rf:\
        :vf=/zamboni0/newsprint/lpd/vf:\
        :cf=/zamboni0/newsprint/lpd/cf:\
        :df=/zamboni0/newsprint/lpd/df:\
        :of=/zamboni0/newsprint/lpd/of:\
        :mx#0:\
        :sf:\
        :sb:\
        :br#19200:\
        :xc#0177777:\
        :ms=-parity,ixon,-opost,-ixany:
        
*****************************************************************

>From shandelm@jpmorgan.com Wed Mar 24 09:10:17 1993
>Return-Path: <shandelm@jpmorgan.com>
>Date: Wed, 24 Mar 93 10:10:10 EST
>From: shandelm@jpmorgan.com (Joel Shandelman FIMS Information Systems - 212-648-4480)
>Message-Id: <9303241510.AA10479@newton.ny.jpmorgan.com>
>To: bataller@sol.acs.uwosh.edu
>Subject: Re: HP III with postscript
>Content-Length: 599
>X-Lines: 10
>Status: RO
>
>I have many HP lJ-S2's with the Adobe PostScript cartridges. I didn't
>have to change the printcap for running them as they use the exact same
>printcap as my Apple LAserWriter NT[X]'s. I would check the printer
>configuration menu and make sure that use use XON/XOFF handshaking rather
>than hardware handshaking. Also, the HP printer cable has a few extra pins
>than are necessary for hardware handshaking. Try a standard null modem cable
>with just pins 2,3 and 7 where 2 and 3 are swapped. That's all I can suggest
>for now. My posting was specifically for HP mode WITHOUT the cartridge.
>
> -- Joel

***********************************************************************

>THis is ours
>
>
># Laser writer on ttya
>#
>lp|postscript:\
> :sd=/usr/spool/lpd/ljIII:\
> :lf=/usr/spool/lpd/ljIII/lp-errs:\
> :if=/usr/local/lib/addctrlD.filter:\
> :br#19200:rw:fc#0000374:\
> :fs#0000003:xc#0:xs#0040040:\
> :ms=-parenb,crtscts:\
> :mx#0:sf:sb:sh:\
> :lp=/dev/ttya:\
> :tr=\004:
>
>
>and the filter if=/usr/local/lib/addctrlD.filter
>
>is the following
>
>
>#!/bin/sh
>cat
>/usr/5bin/echo '\004\c'
>
>
>
>It adds a control D at the end of every print job, to avoid
>our macs from making stuff wind up upside down and shrunk!
>
>sue
>
>Susan KJ Thielen Application Programmer, System Manager
>Robarts Research Institute Phone: (519) 663-3833
>PO Box 5015, 100 Perth Drive Fax: (519) 663-3789
>London, ON N6A 5K8 E-mail: thielen@irus.rri.uwo.ca
>

*******************************************************************

>From rhallqui@rigel.uark.edu Thu Mar 25 09:48:58 1993
>Return-Path: <rhallqui@rigel.uark.edu>
>Date: Thu, 25 Mar 1993 09:48:42 -0600 (CST)
>From: "Roy S. Hallquist, Jr." <rhallqui@rigel.uark.edu>
>Subject: Re: HP III with postscript
>
>Erik, here's a master printcap file that I use. You might find it useful.
>
>...Roy
>
>+---------------------------------------------------------------+
>| Master Printcap Listing - Volume IV 08.13.90 |
>| Please! This collection is "Use At Own Risk" as these are |
>| largely untested (at least by me). More will be added as |
>| they are made available. |
>+---------------------------------------------------------------+
>NOTE: IF YOU HAVE A PRINTCAP ENTRY WHICH IS NOT ON THIS LIST,
> PLEASE SEND IT ALONG TO: rik@Corp.Sun.COM
>
> Table of Contents:
>
> New items are marked with an ASTERISK.
>
>AppleLW_386i
>Calcomp_1023
>Calcomp_1023_SS1 (all purpose)
>Calcomp_1023 (long)
>Calcomp_1023_VAR
>Calcomp_1043
>Calcomp_104x_plotter
>*Calcomp Drawingmaster
>Canon_laser_printer
>DataProducts_8070Plus
>DataProducts_8070Plus_2
>Dataproducts_8070_Plus_3
>Epson_EX1000_tty
>Epson_LQ2550_Serial
>Epson_raster_graphics
>Epson_stsc_apl
>Epson_text
>Ericsson_4156
>Ericsson_4160
>Ericsson_4511(4512)_Centronics
>Ericsson_4511(4512)_RS232
>Ericsson_5819_Centronics
>Facit_Laser_P7080_Diablo_630_Centronics
>Facit_Laser_P7080_Diablo_630_RS232
>Fujitsu_graphics
>HP
>HP_2932wwww_LP
>HP_7475A_plotter_2
>HP_7475_plotter
>HP_7550A_pen_plotter
>HP_7550A_pen_plotter%
>HP 7580 Plotter
>HP_7580
>HP_7595_2
>HP_7595_Draftmaster
>HP_7750A_2
>HP_Laserjet_IIP, IID(pcnfs ok)
>HP_LaserJet_2
>HP_LaserJet_PLUS
>HP_Laserjet_1
>HP_Laserjet_386i
>*HP_Laserwriter on TOPS/Sun
>*HP_PaintjetXL
>HP_Plotters
>HP_ThinkJet
>*IBM_ProPrinter
>Inca_Printers
>LWII_diablo_mode
>LaserwiterPlus_2
>LaserwriterPlus_1
>Monotype_Lasercomp_Typesetter
>NEC_LC890_2
>NEC_LC_890
>Okidata_Microline 391 via RS232 Serial Port (/dev/ttya)
>PRINTRONIX_P600
>Plotters_SS1
>Print_A_Color
>Printronix_2
>Printronix_tab_support
>Printronix_text_only
>TI810
>Tektronix_plotter
>Versatec_8242
>Versatec_8836
>
>......................................................................
>AppleLW_386i
>Apple laserwriter on a 386i
>
>lp | lw:\
> :lp=/dev/ttya:\
> :br#9600:rw:fc#0000374:fs#0000003:\
> :xc#0:xs#0040040:mx#0:\
> :sd=/var/spool/lpd:\
> :lf=/var/adm/lpd-errs:\
> :sh:\
> :sf:\
> :sb
>
>..........
>
>Calcomp 1023
>
>lp:\
> :lp=/dev/ttya:sd=/var/spool/lp:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff,-echo:
>
>Use these settings on the 1023:
>
> Plotter type= 7585A
> format= CPGL
> baud rate= 9600
> 8 data bits, 1 stop bit
> no parity
>..........
>Calcomp_1023_SS1 (all purpose)
>
>For SS1's (which dont have as many flow control problems) we give out
>this all-purpose printcap:
>
>lp:\
> :lp=/dev/ttya:sd=/var/spool/lp:br#9600:sb:sh:sf:\
> :fs#06021:fc#0777:xc#07737:xs#040:
>..........
>Calcomp_1023 (long)
>
>I have gotten the Calcomp 1023 plotter to work fine for a 1Mb plot file
>using lpr on the ttya port with the serial port patch installed. This
>plotter can emulate many different types of plotters and I have tried
>a couple of different ones. Here is what I have tried and I will update
>you as I try different combinations of things.
>
>Test 1 (SUCCESSFUL)
>------
>Printcap entry:
>
>tim:\
> :lp=/dev/ttya:sd=/var/spool/tim:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff,-echo:
>
>Plotter settings:
> Plotter type= 7585A
> format= CPGL
> baud rate= 9600
> 8 data bits, 1 stop bit
> no parity
>
>
>Test 2 (SUCCESSFUL)
>------
>Printcap entry:
>
>tim:\
> :lp=/dev/ttya:sd=/var/spool/tim:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff,-echo:
>
>Plotter settings:
> Plotter type= CLCMP
> format= CPGL
> baud rate= 9600
> 8 data bits, 1 stop bit
> no parity
>
>Test 3 (SUCCESSFUL)
>------
>Printcap entry:
>
>tim:\
> :lp=/dev/ttya:sd=/var/spool/tim:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff,-echo:
>
>Plotter settings:
> Plotter type= CLCMP
> format= CPGL
> baud rate= 9600
> 7 data bits, 1 stop bit
> even parity
>
>
>Test 4 (FAILED): "data framing error....RESET" error on plotter
>------
>Printcap entry:
>
>tim:\
> :lp=/dev/ttya:sd=/var/spool/tim:br#9600:sf:sh:mx#0:\
> :ms=cs8,ixon,ixoff:
>
>Plotter settings:
> Plotter type= 7585A
> format= CPGL
> baud rate= 9600
> 8 data bits, 1 stop bit
> no parity
>
>The calcomp 1023 plotter is known as a non-roll feed plotter. This means
>that you must change sheets of paper between plot jobs. So if you send
>multiple plot jobs to the queue with lpr, this plotter starts the next plot
>right after the last plot, on the same piece of paper!
>
>So, to get around this problem we must send a halt request to the plotter
>to kind of put it offline in between plots so that we can change the
>paper. To do this I created a file called "nr" and its contents are as
>follows:
>
>NR;
>
>I then have to send this file to the plotter with lpr in between plot jobs.
>For instance,
>
>lpr plot1
>lpr nr
>lpr plot2
>lpr nr
>lpr plot3
>
>And so on, and so on. This NR; is the "not ready" HPGL command which the
>calcomp recognizes in its version of HPGL called CPGL.
>..........
>Calcomp1023_VAR
>
>Here is the printcap for the 1023 that we give out to the VARs:
>
>lp:\
> :lp=/dev/ttya:sd=/var/spool/lp:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff,-echo:
>
>Use these settings on the 1023:
>
> Plotter type= 7585A
> format= CPGL
> baud rate= 9600
> 8 data bits, 1 stop bit
> no parity
>
>Note that this information is for the 386i running 4.0.2.
>
>For SS1's (which dont have as many flow control problems) we give out
>this all-purpose printcap:
>
>lp:\
> :lp=/dev/ttya:sd=/var/spool/lp:br#9600:sb:sh:sf:\
> :fs#06021:fc#0777:xc#07737:xs#040:
>
>..........
>The Calcomp 1043 plotter
>------------------------
>
>I did some testing with a Calcomp 1044 plotter(which is the roll-feed version
>of the 1043) yesterday and was able to get a set of working settings for
>the 386i. I was able to get a 1Mb plot file to go out to the plotter no
>problem.
>
>The plotter settings that I used were the following:
>
>PCI mode
>7 data bits
>1 stop bit
>even parity
>xon/xoff= yes
>direct control =yes or no
>full duplex
>sync code = 2
>sync code value = 022
>internal clock
>term muting = no
>chksum enable = yes
>isochronous = no
>
>The switch bank on the back of the plotter had switch 5 on and all the
>rest off. This meant it was set to normal DTE.
>
>The printcap entry used for the plotter was the following:
>
>tim:\
> :lp=/dev/ttya:sd=/var/spool/tim:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff,-echo:
>
>
>
>..........
>Calcomp 104x plotter
>
>I did some testing with a Calcomp 1044 plotter(which is the roll-feed version
>of the 1043) yesterday and was able to get a set of working settings for
>the 386i. I was able to get a 1Mb plot file to go out to the plotter no
>problem.
>
>The plotter settings that I used were the following:
>
>PCI mode
>7 data bits
>1 stop bit
>even parity
>xon/xoff= yes
>direct control =yes or no
>full duplex
>sync code = 2
>sync code value = 022
>internal clock
>term muting = no
>chksum enable = yes
>isochronous = no
>
>The switch bank on the back of the plotter had switch 5 on and all the
>rest off. This meant it was set to normal DTE.
>
>Also, probably a grey area for most users out there: The plotter had the
>most current ROM pack on it. This particular plotter can switch ROM packs
>around. There is also a CPGL ROM pack (as opposed to the PCI ROM pack
>that I had on the plotter) that emulates HPGL(Hewlett-Packard Graphics
>Language) that some users may think they have, but this is an additional
>ROM pack that must be purchased. Anyways, a user cannot tell by looking
>at the ROM pack whether they have the most current ROM pack or not. They
>need to call their local Calcomp Field Service office and they can help
>them with this issue.
>
>The printcap entry used for the plotter was the following:
>
>tim:\
> :lp=/dev/ttya:sd=/var/spool/tim:br#9600:sf:sh:mx#0:\
> :ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff:
>
>The plotter was not added thru SNAP!
>
>Anyways, this is a tested configuration for the 104x Calcomp plotters and
>the only thing that the customer might want to check if this doesn't work
>is to find out what rev of the ROM on the plotter they are running.
>
>..........
>This is a working printcap entry for the Calcomp Drawingmaster connected
>to a 4/60:
>
>lp|cal|CAL|calcomp|Calcomp-Drawingmaster:\
> :lp=/dev/ttyb:br#19200:\
> :sd=/var/spool/lp:mx#0:sf:sh:\
> :lf=/var/spool/lp/lp-errors:\
> :ms=cs7,parenb,-parenodd,-opost,-echo,ixon,istrip:
>
>The wiring is pin 2,3,7 straight through.
>
>Calcomp settings:
>
>com1
>Input Monitor Dump = NO
>Baudrate = 19200
>Character Framing (bits,parity,stop bits) = 7,E,1
>Host to Plotter CDLC Protocol = CTS
>Plotter to Host CDLC Protocol = CTS
>Dead Job Time Out (SEC) = 10
>Time Out Action = FORCE
>Plot Command Language = 907
>Steps per Inch = 400
>Plot Data Protocol = XON/XOFF
>Beginning of Record Sync Character = S16
>Number of Sync Characters = 2
>End of Record Character = SOD
>Checksum = Y
>
>..........
>Canon_laser_printer
>
># canon laser printer
>2|lp3|pp3|laser printer:\
> :sd=/usr/spool/lpd:lf=/usr2/util/.printer.log:\
> :br#9600:fc#0177777:fs#0006020:lp=/dev/tty0a:xc#0177777:xs#040000:
>
>..........
>DataProducts 8070Plus line printer
>
> Printer config for XON/XOFF, 9600 baud, serial
>
> Custom Cable:
> Sun Printer
> 2 ----- 3
> 3 ----- 2
> 7 ----- 7
> 5 ----- 25
>
>
> /etc/printcap:
> # Dataproducts 8070
> dp8070|zebu|dw8|impact:\
> :lp=/dev/ttya:\
> :rp=dp8070:\
> :sd=/var/spool/dp8070:\
> :lf=/var/spool/dp8070/dp8070-log:\
> :br#9600:rw:\
> :pl#66:pw#132:\
> :sh:ms=-oddp,ixon,ixany,crtscts:
>
>..........
>DataProducts_8070Plus_2
>
>Not that one but a Dataproducts 8070Plus line printer:
>
> Printer config for XON/XOFF, 9600 baud, serial
>
> Custom Cable:
> Sun Printer
> 2 ----- 3
> 3 ----- 2
> 7 ----- 7
> 5 ----- 25
>
>
> /etc/printcap:
> # Dataproducts 8070
> dp8070|zebu|dw8|impact:\
> :lp=/dev/ttya:\
> :rp=dp8070:\
> :sd=/var/spool/dp8070:\
> :lf=/var/spool/dp8070/dp8070-log:\
> :br#9600:rw:\
> :pl#66:pw#132:\
> :sh:ms=-oddp,ixon,ixany,crtscts:
>
>
>
>..........
>
>Dataproducts_8070_Plus_3
>
># Dataproducts 8070 Plus
>dp8070|impact:\
> :lp=/dev/ttya:\
> :rp=dp8070:\
> :sd=/var/spool/dp8070:\
> :lf=/var/spool/dp8070/dp8070-log:\
> :br#9600:rw:\
> :pl#66:pw#132:\
> :sh:ms=-oddp,ixon,ixany,crtscts:
>
>..........
>
>Epson EX1000 over a tty line
>
>#
># Epson EX1000 over a tty line.
># Contributed by Paul Leylan<pcl%robots.oxford.ac.uk@nss.cs.ucl.ac.uk>
>#
>lp|epson:\
> :lp=/dev/ttyb:\
> :br#9600:fc#0177777:fs#0000002:xc0177777:xs0040440:\
> :tr=\f:of=/usr/lib/lpf:lf=/usr/adm/lpd-errs:
>
>..........
>
>Epson LQ2550 Serial:
>
>stty info is as follows:
>
>{pita:SUPER-USER:46} stty -a < /dev/ttyb
>speed 4800 baud, 36 rows, 76 columns
>parenb -parodd cs7 -cstopb -hupcl cread -clocal -crtscts
>-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
>ixon -ixany ixoff imaxbel
>isig icanon -xcase echo echoe echok -echonl -noflsh -tostop
>echoctl -echoprt echoke
>opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel
>erase kill werase rprnt flush lnext susp intr quit stop eof
>^? ^U ^W ^R ^O ^V ^Z/^Y ^C ^\ ^S/^Q ^D
>
>Printcap info:
>westlp|lp|epson|Epson:\
> fs#06020:fc#0300:xs#040:br#4800:\
> :lp=/dev/ttyb:tr=\f:sd=/var/spool/westlp:\
> :lf=/usr/spool/westlp/lw-log:\
>
>..........
>
>Epson in plot mode (raster graphics)
>
># epson in plot mode (raster graphics)
>6|lp6|epplot :\
> :sd=/usr/spool/epplot:sh:lf=/usr2/util/.printer.log:\
> :br#4800:fc#0177777:fs#0000040:lp=/dev/tty0b:xc#0177777:xs#000040:
>
>..........
>
>Epson for stsc apl
>
># epson for stsc apl
>11|lp11|pp11|aplepson:\
> :sd=/usr/spool/epson:sh:lf=/usr2/util/.printer.log:\
> :br#4800:fc#0177777:fs#0000000:lp=/dev/tty0b:xc#0177777:xs#000040:
>
>..........
>
>Epson text
>
># epson text
>1|lp2|pp2|epson:\
> :sd=/usr/spool/epson:lf=/usr2/util/.printer.log:\
> :br#4800:fc#0177777:fs#0006020:lp=/dev/tty0b:xc#0177777:xs#040040:
>
>..........
>
>Ericsson 4156
>
>lp|4156|Ericsson 4156:\
> :lp=/dev/tty00:fo:br#2400:fc#0177777:fs#06220:pl#66:pw#80:\
> :sd=/usr/spool/lpd:if=/usr/lib/lpf:lf=/usr/adm/lpd-errs:tr=\f:
>
>..........
>
>Ericsson 4160
>
>#
>lp|4160|Ericsson 4160:\
> :lp=/dev/tty00:fo:br#9600:fc#0177777:fs#06220:pl#66:pw#80:\
> :sd=/usr/spool/lpd:if=/usr/lib/lpf:lf=/usr/adm/lpd-errs:tr=\f\f:
>
>..........
>
>Ericsson 4511(4512)/Centronics
>
>lp|4511C|Ericsson 4511(4512)/Centronics:\
> :lp=/dev/lp0:fo:pl#66:pw#80:\
> :sd=/usr/spool/lpd:if=/usr/lib/lpf:lf=/usr/adm/lpd-errs:tr=\f:
>
>..........
>
>Ericsson 4511(4512)/RS232
>
>lp|4511|Ericsson 4511(4512)/RS232:\
> :lp=/dev/tty00:fo:br#9600:fc#0177777:fs#06220:pl#66:pw#80:\
> :sd=/usr/spool/lpd:if=/usr/lib/lpf:lf=/usr/adm/lpd-errs:tr=\f:
>
>..........
>
>Ericsson 5819/Centronics
>
>lp|5819C|Ericsson 5819/Centronics:\
> :lp=/dev/lp0:ff=\^\r\n[0!s\r\f:fo:pl#66:pw#80:sd=/usr/spool/lpd:\
> :if=/usr/lib/lpf.5819:lf=/usr/adm/lpd-errs:of=/usr/lib/lpf.5819:\
> :tr=\^\r\n[6~\r\f\f:
>
>..........
>
>Facit Laser P7080 in Diablo 630/Centronics
>
>lp|7080|Facit Laser P7080 in Diablo 630/Centronics:\
> :lp=/dev/lp0:\
> :ff=\E\ESB2,2,12,0,2E,10,2,0.D3,1,6,80,30,8,4.J3W1\E\ET\EF2.\EL3.\f:\
> :pl#66:pw#132:sd=/usr/spool/lpd:if=/usr/lib/lpf:\
> :lf=/usr/adm/lpd-errs:tr=\E\ESJS3R1:
>
>
>..........
>
>Facit Laser P7080 in Diablo 630/RS232
>
>lp|7080|Facit Laser P7080 in Diablo 630/RS232:\
> :lp=/dev/tty00:br#9600:fc#0177777:fs#06020:\
> :ff=\E\ESB2,2,12,0,2E,10,2,0.D3,1,6,80,30,8,4.J1W1\E\ET\EF2.\EL3.\f:\
> :pl#66:pw#132:sd=/usr/spool/lpd:if=/usr/lib/lpf:lf=/usr/adm/lpd-errs:\
> :tr=\E\ESJS3R1:
>..........
>
>Fujitsu graphics hardcopy device
>
># Fujitsu graphics hardcopy device.
>#
>lpfuji|fuji|RAW:\
> :lp=/dev/lp0:sd=/usr/spool/lpfujid:sh:xs#040:
>
>..........
>HP stuff
>
># @(#)printcap.hp 1.2 4/17/85
>#
># Inca Printers
>#
>hp|lp|tjtest:\
> :br#9600:lp=/dev/ttya:fs#06021:of=/usr/erh/inca/bin/sd.hp:\
> :lf=/usr/adm/lpd-errs:fc#0777:pl#60:xc#07737:xs#040:sd=/usr/spool/hp:
>ep|epson|Epson printer:\
> :lp=:rm=apollo:rp=ep:sd=/usr/spool/ep:
>
>..........
>
>HP 2932 Line printer
>
># HP 2932 Line printer
>hp2932|lw6|line:\
> :lp=/dev/ttya:\
> :rp=lp6:\
> :sd=/var/spool/lw6:\
> :lf=/var/spool/lw6/lw6-log:\
> :pl#66:pw#132:\
> :br#9600:rw:
>
>..........
>
>HP7475A plotter
>
>
>7|lp7|lw7|hp7580|hp7475|plotter|local A/D size HP pen plotter:\
> :lp=/dev/ttya:\
> :mx#0:\
> :br#9600:\
> :sd=/usr/spool/lwd7:\
> :lf=/usr/spool/lwd7/log:
>
>(assuming the `A' model is not different)
>
>..........
>
>HP7475 plotter (LONG FILE)
>
>I have had numerous calls in making a plotter work on a 386i serial port whether it is on ttya or the second serial port. There are two common configurations for plotters.
>
>Make sure that the printcap and ypprintcap is the same file as we all know this was a known problem in 4.0.0 for remote printing.
>
>For a plotter with 9600 baud, 7 databits, 1 stop bit, even parity and xon/xoff include the following in the printcap (common config for autocad):
>
>:br#9600: \ #sets baud rate
>:sh:sf: \ #suppresses header and footer
>:xs#040000: \ #sends a cntl Q for DTR
>:ms=-parityenb,-parityodd,-crtscts,-cstopb,cs7,ixon,-opost: #comm parameters
>
>For a plotter with 9600 baud, 8 databits, 1 stop bit, no parity , and xon/xoff include the following in the printcap:
>
>:br#9600: \ #sets baud rate
>:sh:sf: \ #suppresses header and footer
>:xs#040000: \ #sends a cntl Q for DTR
>:ms=-parity,-crtscts,-cstopb,cs8,ixon,-opost: #comm parameters
>
>Reference: man pages termio on ms options
>
>Most plotters do not utilize pin 8 on the serial cable. In the Owner's Bulletin pg. 16 it tells you to put the following in rc.local:
>
>/usr/etc/ttysoftcar -y /dev/tty
>
>There is also a known problem with the serial port that was suppose to have been fixed in 4.0.1. The serial port prematurely closes before it is finish plotting. Tim is working on this problem with ecd. A temporary fix is to run the following cat > /de
>>
>
>v/tty$
>$ should be replaced with a, m0, or m1 depending on the serial port being used.
>This will dedicate a window but this is temporary until a patch can be made.
>
>Also note for those adding second serial ports. The serial port that comes with the RR does not deal with interrupts that DOS cares about. This port should be assigned to /dev/ttya at all times. Using /dev/ttym0 the serial port should be assigned inter
>>
>
>rupt 4 and for /dev/ttym1 should be assigned interrupt 3. Therefore, a total of three serial ports can be added.
>
>Another note for AutoCAD users:
>There is a problem running a digitizer on a second serial port. Must use digitizer on /dev/ttya and plotters on second serial port. Autodesk is working on this problem.
>..........
>HP 7550A pen plotter
>
> I'll start with the HP 7550A pen plotter. Now keep in mind that these
>are suggested workarounds and are not guaranteed, so don't hold me liable
>if they do not work. I'm merely relaying information from my customers.
>Anyways, the printcap, cabling, and plotter settings that are needed for
>this plotter to work on the serial port are the following:
>
>HP 7550A
>--------
>
> printcap entry
> ---------------
> hp:\
> :lp=/dev/ttya:br#9600:rm=<hostname>:rp=hp:sd=/var/spool/hp:\
> :mx#0:sh:sf:ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff:
> cabling
> -------
> a null modem cable or something with pinouts such as:
>
> 386i plotter
> 2-------------3
> 3-------------2
> 7-------------7
> 4---
> |
> 5---
> 6---
> |
> 8---
> |
> 20---
>
> Plotter
> -------
> set to 8 bits, no parity, xon/xoff, 9600, standalone, remote
>
>Now we aren't finished yet. In some instances this may be all you need, but
>the majority of the time you will still need to type the following command to get the plot to complete:
> cat /dev/ttya > /dev/null &
>This will be running in the backgroheck ht
>
>power cycle your plotter this process will die and you must retype it in a
>commands window. This line can also be started from rc.local at boot up
>time.
>..........
>HP 7580 Plotter
>
>
>
> 7|plotter|hp7580|hp7475|local A/D size HP pen plotter:\
> :lp=/dev/ttya:\
> :mx#0:\
> :br#9600:\
> :sd=/usr/spool/plotter:\
> :lf=/dev/console:
>
>
>..........
>HP 7580 (A SUGGESTION! LONG FILE)
>
>This workaround was suggested by a VAR and has spooling working fine for his AutoCAD plot files. It consists of using a C program as an output filter that changes some output settings while the plot file goes through it. He also had to send a file in be
>>
>
>tween plots which actually turned the plotter offline so that the plotter would not start the next plot in the queue on top of the one it just finished. This allows the user to change paper in the plotter, put the plotter back online(manually), and watch
>>
>
>the next plot start up.
>
> His printcap entry looked like the following:
>
> plotter:\
> :sh:\
> :lp=/dev/ttya:\
> :sd=/var/spool/plotter:\
> :of=/home/user1/spf:\
> :lf=/var/adm/plotter_errs:
>
> where user1 is the name of some user with home directory in
> /home/user1.
>
> Here is the C program spf.c that he used as the output filter. It must
>be compiled first before it can be used. The command line for compiling the
>program is: cc -o spf spf.c.
>
>#include <stdio.h>
>#include <sys/types.h>
>#include <sys/stat.h>
>#include "termios.h"
>
>extern void exit();
>extern void perror();
>
>struct termios cb;
>
>main(argc, argv)
>int argc;
>char *argv[];
>{
> char c;
> int n;
> long s;
>
> /* get settings for stdout (were only changing a few) */
> if(ioctl(1, TCGETS, &cb) == -1) {
> perror("1 spf");
> exit(2);
> }
>
> s = cb.c_cflag;
>
> /* disable parity (was enabled) */
> cb.c_cflag &= ~PARENB;
> cb.c_cflag |= 0;
>
> /* 8 bit chars (was CS7) */
> cb.c_cflag &= ~CSIZE;
> cb.c_cflag |= CS8;
>
> if(ioctl(1, TCSETSW, &cb) == -1) {
> perror("2 spf");
> exit(2);
> }
>
> while ((c = getchar()) != EOF)
> putchar((char) c);
>
> cb.c_cflag = s;
> if(ioctl(1, TCSETSW, &cb) == -1) {
> perror("3 spf");
> exit(2);
> }
>
> exit(0);
>}
>
>The other file that gets printed in between plots is just a file thatcontains one HPGL command. It is "NR;", which causes the plotter to become "not ready" so that the paper can be changed. The plotter is
>then put back online. So a typical plotting sequence with this method
>might look like this:
> plot1
> /home/user1/nr #file with NR; in it
> plot2
> /home/user1/nr
> plot3
> /home/user1/nr
>
>Now remember, this is not guaranteed, only a suggestion.
>
>..........
>HP 7595
>
>This is a non-roll feed plotter. The method for using this plotter is identical for using the 7550A plotter. One added note to keep in mind: a field called tr can be added to the printcap entry that prints out a trailer string after the plot is finishe
>>
>
>d. This trailer would be the HPGL command 'AF;' which tells the plotter to do a full page advancement before starting the next plot. Using this method, spooling has worked for some VARs. So the new field in the printcap entry would have the form
> :tr=AF;:
>and could be put anywhere in the printcap entry for the plotter.
>..........
>
>HP 7595 Draftmaster
>
>I have received a printcap entry from a VAR who has gotten his
>HP 7595 Draftmaster I to work on the ttya, ttym1, and ttym0 serial
>ports on the 386i. The AT serial card he has in his 386i is made
>by JDR and is called the 286/386 Multi-I/O card(part#MCT-ATIO).
>He configured the ports on the card as ttym0 and ttym1. He also had
>an upgrade kit for the card called the Serial ATIO kit.
>
>Here's the entry he has gotten all 3 serial ports to work for his plotter:
>(His 386i was configured as a standalone, but will be put up on a
>network soon):
>
>Note: the lp field can be set to /dev/ttya, /dev/ttym1, or /dev/ttym0.
>
> hpp:\
> :lp=/dev/ttya:br#9600:rm=<hostname>:rp=hpp:sd=/var/spool/hpp:\
> :mx#0:sf:ms=cs7,parenb,-parodd,-ignpar,ixon,ixoff:
>
>
>where:
>
>mx#0 => unlimited size for a file
> ms =cs7 => 7 character(data) bits
> =parenb => parity generation and detection enabled
> =-parodd => disable odd parity
> ^^^^^^^
> =-ignpar => characters with framing or parity errors
> (other than break) are not ignored.
> ^^^
> =ixon => enable start/stop output control
> =ixoff => enable start/stop input control
>
>..........
>
>HP 7750A
>Note that the HP 7750A can be programmed to use XON/XOFF by sending the
>sequence "\033.P1:" or by front panel selections.
>
>#
># HP pen plotter, connected locally, running at 9600 baud
>#
>hp|hpplotter|hp7550A|Hewlett-Packard pen plotter in 1E404:\
> :lp=/dev/tty02:sd=/usr/spool/hp:\
> :lf=/usr/spool/hp/log:af=/usr/spool/hp/acct:\
> :br#9600:fc#0377:fs#0221:mx#0:\
> :rw:sh:sb:fo:\
> :ff=\033.J\033.P1\:\033.T\:\nPG;\n:\
> :of=/usr/local/lib/vp/hpfilter:
>#
>
>Note that the HP 7750A can be programmed to use XON/XOFF by sending the
>sequence "\033.P1:" or by front panel selections.
>
>..........
>HP_Laserjet_IIP, IID(pcnfs ok)
>
>There are a couple of new models of hplaserjet; Model IIP and IID. The
>following printcap works with the hplaserjet on a sparcstation1.
>Note that you need to use a filter to remap unix files to dos format.
>This filter can be found on the Sun386i under /usr/lib/hplaserjet.
>My customer has also tested it with pcnfs and says it works great.
>
>inter:\
> :lp=/dev/ttya:sd=/var/spool/inter:br#9600:rm=intcad:rp=inter:\
> :fs#06021:fc#0777:sb:sh:sf:xc#07737:xs#040:of=/usr/lib/hplaserjet:
>
>..........
>HP LaserJet
>
>###############
># HP LaserJet.
># If you're using the LaserJet's serial port, the port should be configured
># to use the RS-422 interface (it uses the RS-232 interface by default).
># The LaserJet User's Manual says we should talk to the serial port
># in the following manner:
>#
># no parity, 8 bits, 1 stop bit, xon/xoff enabled, rts/cts enabled
>#
># Also note that the output filter is called to output an escape sequence
>generic_hp:\
> :pw#80:\
> :ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost:of=/usr/lib/hplaserjet:
>#
>
>..........
>
>HP laser Jet PLUS!! (THIS IS A VERY LONG ONE!!)
>
>
>1. A new printcap entry is needed. The generic_hp entry in the /etc/ypprintcap
>file on the yp master should read as follows:
>
>
>generic_hp:\
> :pw#80:\
> :ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost:of=/usr/lib/hplaserjet:
>
>
>2. Install the file at the end of this message into /usr/lib as hplaserjet by:
>
> mount -o remount /usr
> cp hplaserjet /usr/lib
> chmod 555 /usr/lib/hplaserjet
>
>3. Decide which interface you are going to use - serial or parallel port
>
>4. Connect the printer to the 386i with the appropriate cable
>
>5. Configure your hplaserjet to use the serial port or parallel port by using
>the printer manual. For the laserjet II, its called "Getting Started with the
>LaserJet series II printer", HP Part number (on the bottom right hand corner)
>is 33440-90908.
>
>For the serial port, use instructions on pages
>3-7 and 3-8. NOTE that you must configure the printer to use the RS-422
>interface.
>
>For the parallel port, use instructions on pages 3-9
>
>6. use SNAP to add the printer:
>- use 9600 if the serial port is chosen
>- choose laserjet as the printer type.
>
>Printing
>========
>(Asumming you set up the printer to be lp above)
>
>>From Unix, use lpr <file> to print files
>>From DOS, make sure that the setup.pc line in your ~pc directory
>has:
>
>LPT1: lpr
>
>print to this using the DOS print command and LPT1: as the printer
>
>The HPLASERJET file:
>====================
>
>Cut below the ---- line for the hplaserjet file mentioned in step 2
>-------------------------------------------------------------------
>#!/bin/csh -f
>#
># @(#)hplaserjet 1.1 88/10/27 Sun Microsystems Inc 1988
>#
>#
># This is the output filter form use with HP laserjets I and II.
># It is called via the of entry in the generic_hp printcap entry
># All it does is send the escape sequence to the printer, so that:
># CR is mapped to CR
># LF is mapped to CR LF
># FF is mapped to CR FF
>/usr/bin/echo -n 'k2G'
>/usr/bin/cat
>if ($status == 0) then
> exit 0
>else
> exit 1
>endif
>
>
>
>............Here is some more hope it helps...............
>Here it is, courtesy of Cal Thixton (thanks Cal, if you're still
>alive?). He wrote 2 printcaps, one for normal mode, one for graphicsmode. I have also included his raster print program for printing
>screendumps, which includes the graphics mode printcap as a comment..
> Cal's HP laserjet Printcaps >>>>>>>>>>>>>>>>>>>lp|This is for normal printing of text files:\
> :br#9600:lp=/dev/ttya:fs#06021:of=/usr/lib/lpf.hp:\
> :lf=/usr/adm/lpd-errs:fc#0777:sb:sh:pl#60:sf:
>tp|This is for printing graphics dumps:\
> :br#9600:lp=/dev/ttya:fs#06021:of=/usr/lib/lpf.tp:\
> :lf=/usr/adm/lpd-errs:fc#0777:sb:sh:pl#60:xc#07737:xs#040:sf:
>write a script: this is /usr/lib/lpf.hp
> #! /bin/sh
> echo -n ^[\&k1G
> cat | tr '\012' '\015'
> echo -n ^L
> echo -n ^[E
> exit 0
>
>and: this is /usr/lib/lpf.tp
> #! /bin/sh
> cat
> echo -n ^L
> echo -n ^[E
> exit 0
>
>
><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Cal's HP laserjet screendump printing filter >>>>>>>>>#include <rasterfile.h>
>#include <stdio.h>
>
>/*
>* This is a filter for hp laserjet printers. this
>* expects to be fed by something like screendump.
>* Make sure your braindamaged hp has more than 50k
>* in it, else you'll be getting this print on
>* three pages, if you're lucky. when the 256k version
>* comes out, things will be better.
>* Use a printcap entry like:
>* # HP Laserjet printer
>* tjhpbit|hpbit:\
>* :br#9600:lp=/dev/ttya:fs#06021:of=/usr/lib/sd.hp:\
>* :lf=/usr/adm/lpd-errs:fc#0777:sb:sh:pl#60:xc#07737:xs#040:sf:
>*
>*/
>
>main()
>{
> struct rasterfile r;
> int i,j;
> char buffer[BUFSIZ*4];
>
> if(read(0, &r, sizeof(r)) != sizeof(r)) {
> perror("mishap");
> exit(1);
> }
>
> setbuffer(stdout, buffer, BUFSIZ*4);
> printf("\033E"); /* reset */
> printf("\033*t150R"); /* 100 DPI */
> printf("\033&k1H"); /* horiz spacing */
> for(i=0 ; i < r.ras_height ; i++) {
> printf("\033*r0A"); /* Start raster */
> printf("\033*b%dW", r.ras_width/8);
> for(j=0 ; j < (r.ras_width/8); j++)
> printf("%c", getchar());
> printf("\033*rB"); /* Stop raster */
> printf("\033&a0H"); /* horiz 0 */
> }
> printf("\f"); /* formfeed */
> printf("\033E"); /* reset */
> fflush(stdout);
>}
>
>-------------------------------------------------------------------------
>
>I wrote a screen dump for a HP Laserjet printer, but unless you get
>the new printers with 1/4meg, then you would get your screendump on
>up to 3 separate pages. the HP has problems and it is not very smart.encourage the purchase of an apple.
> cal
>
>
>#ifndef lint
>static char sccsid[] = "@(#)sd.hp.c 1.2 4/17/85";
>#endif
>
>#include <rasterfile.h>
>#include <stdio.h>
>#include <signal.h>
>#include <sys/file.h>
>
>/*
>* This is a filter for hp laserjet printers. this
>* expects to be fed by something like screendump.
>* Make sure your braindamaged hp has more than 50k
>* in it, else you'll be getting this print on
>* three pages, if you're lucky. when the 256k version
>* comes out, things will be better.
>* Use a printcap entry like:
>* # HP Laserjet printer
>* tjhpbit|hpbit:\
>* :br#9600:lp=/dev/ttya:fs#06021:of=/usr/lib/sd.hp:\
>* :lf=/usr/adm/lpd-errs:fc#0777:sb:sh:pl#60:xc#07737:xs#040:sf:
>* everything read will be copied to stdout till the
>* magic number for a rasterfile is encountered, then
>* it will do its thing. tabs are also expanded
>* correctly.
>*/
>
>main(argc, argv)
>int argc;
>char *argv[];
>{
> struct rasterfile r;
> int i,j,k,l,m,n, col;
> char *q, *p[8], send[32], c, *malloc();
> char buffer[BUFSIZ*4];
>
> flock(fileno(stdout), LOCK_EX);
> setbuffer(stdout, buffer, BUFSIZ*4);
> while(1) {
> printf("\033&l0O");
> printf("\033(8U");
> printf("\033(s0p16.66h8.5v0s0b0T");
> printf("\033&k3G");
> printf("\033&a13L");
> fflush(stdout);
> for(m=RAS_MAGIC, q=(char *) &m,i=col=0; i < sizeof(m);) {
> if(((n = getchar()) & 0xff) == (q[i] & 0xff)) {
> i++;
> continue;
> }
> if(n == EOF && feof(stdin)) {
> fflush(stdout);
> fclose(stdout);
> exit(0);
> }
> if(i)
> putchar(q[i=0]);
> switch(n) {
> case '\t':
> for(i=8-(col%8); i; i--)
> putchar(' ');
> col = 0;
> break;
> case '\r':
> case '\n':
> case '\f':
> col = 0;
> putchar(n);
> case '\033':
> break;
> default:
> putchar(n);
> col++;
> }
> }
> j = sizeof(r) - sizeof(int);
> q = (char *) &r;
> if(fread(q + sizeof(int), j, 1, stdin) != 1) {
> perror("mishap");
> exit(1);
> }
> /* get extra bits per line */
> k = ((((r.ras_width + 15) / 16) * 16) - r.ras_width); if (k>7) {
> k -= 8;
> l = 1;
> }
> else
> l = 0;
> printf("\033*t150R"); /* 100 DPI */
> printf("\033&k1H"); /* horiz spacing */
>#define SPACE_OVER 11 /* 11 * 8 = 72pixels ~ .75 inch */
> for(i=0 ; i < r.ras_height ; i++) {
> printf("\033*r0A"); /* Start raster */
> printf("\033*b%dW", ((r.ras_width + k)/8) + SPACE_OVER);
> for(j=0 ; j < SPACE_OVER; j++)
> putchar(0);
> for(j=0 ; j < (r.ras_width/8); j++)
> if((n = getchar()) == EOF && feof(stdin))
> exit(0); /* throw away a byte */
> else
> putchar(n);
> if(k)
> if((n = getchar()) == EOF && feof(stdin))
> exit(0); /* throw away a byte */
> else
> putchar(n & (0xff << (k-1))); /* zero unwanted bits */
> if(l) {
> if((n = getchar()) == EOF && feof(stdin))
> exit(0); /* throw away a byte */
> if(!k)
> putchar(n);
> }
> printf("\033*rB"); /* Stop raster */
> printf("\033&a0H"); /* horiz 0 */
> }
> printf("\f"); /* formfeed */
> fflush(stdout);
> }
>}
>
>sigTERM()
>{
> printf("\f");
> printf("\033E"); /* reset */
> fflush(stdout);
> exit(0);
>}
>
>..........
>
>HP Laserjet (LONG FILE)
>
>###############
># HP LaserJet.
># If you're using the LaserJet's serial port, the port should be configured
># to use the RS-422 interface (it uses the RS-232 interface by default).
># The LaserJet User's Manual says we should talk to the serial port
># in the following manner:
>#
># no parity, 8 bits, 1 stop bit, xon/xoff enabled, rts/cts enabled
>#
># Also note that the output filter is called to output an escape sequence
>generic_hp:\
> :pw#80:\
> :ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost:of=/usr/lib/hplaserjet:
>#
>---------------------- cut here -------------------------
>
>The necessary line printer filter to use.
>
>---------------------- cut here -------------------------
>#!/bin/csh -f
>#
># @(#)hplaserjet 1.1 88/10/27 Sun Microsystems Inc 1988
>#
>#
># This is the output filter form use with HP laserjets I and II.
># It is called via the of entry in the generic_hp printcap entry
># All it does is send the escape sequence to the printer, so that:
># CR is mapped to CR
># LF is mapped to CR LF
># FF is mapped to CR FF
># note that on the next line the "^[" is a real escape character
># just in case it gets lost in the mail (if this is mailed)
>
>/usr/bin/echo -n '&k2G'
>/usr/bin/cat
>if ($status == 0) then
> exit 0
>else
> exit 1
>endif
>
>###################################################################
>
>..........
>
>HP Laserjet Printers & 386i (LONG FILE)
>
>Recently on sun-spots and various other places I have seen many people
>trying to configure HP Laserjet printers to run on their sun systems.
>On the 386i we have aready solved this problem with the following
>printcap entry and a special printer filter. This filter and printcap entry
>also work on a 3/260 using and HP colorjet printer.
>
>One note of caution, make sure that your customer reads the manual for the
>printer and has the proper cable, the HP laserjets will NOT work on a null
>modem cable.
>
>/etc/printcap entry is as follows:
>
>---------------------- cut here -------------------------
>
>
>###############
># HP LaserJet.
># If you're using the LaserJet's serial port, the port should be configured
># to use the RS-422 interface (it uses the RS-232 interface by default).
># The LaserJet User's Manual says we should talk to the serial port
># in the following manner:
>#
># no parity, 8 bits, 1 stop bit, xon/xoff enabled, rts/cts enabled
>#
># Also note that the output filter is called to output an escape sequence
>generic_hp:\
> :pw#80:\
> :ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost:of=/usr/lib/hplaserjet:
>#
>---------------------- cut here -------------------------
>
>The necessary line printer filter to use.
>
>---------------------- cut here -------------------------
>#!/bin/csh -f
>#
># @(#)hplaserjet 1.1 88/10/27 Sun Microsystems Inc 1988
>#
>#
># This is the output filter form use with HP laserjets I and II.
># It is called via the of entry in the generic_hp printcap entry
># All it does is send the escape sequence to the printer, so that:
># CR is mapped to CR
># LF is mapped to CR LF
># FF is mapped to CR FF
># note that on the next line the "^[" is a real escape character
># just in case it gets lost in the mail (if this is mailed)
>
>/usr/bin/echo -n '&k2G'
>/usr/bin/cat
>if ($status == 0) then
> exit 0
>else
> exit 1
>endif
>..........
>HP_Laserwriter for TOPS/Sun
>
>Sample of a TOPS/Sun printcap entry:
>*Note you must have the TOPS/Sun software installed.
>
>(printing from your Sun to a Laserwriter on LocalTalk)
>
>Printcap entry:
>lp|lw|LaserWriter|NameThatTune@TechServices:\
> :lp=/dev/lw:\
> :sd=/var/spool/lw:\
> :lf=/var/spool/lw/lw-log:\
> :if=/usr/local/lib/lw/topslwprint.sh:\
> :af=/var/adm/lw.acct:
>
>Printcap entry with transcript:
># PostScript printer
>
>lw|lp|PostScript|lp0|ps|postscript|purple|Purple Top@Engineering:\
> :lp=/dev/lw:\
> :sd=/var/spool/lw:\
> :lf=/var/spool/lw/lw-log:\
> :br#9600:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:mx#0:sf:sb:\
> :if=/usr/local/lib/lw/psif:\
> :of=/usr/local/lib/lw/psof:\
> :gf=/usr/local/lib/lw/psgf:\
> :nf=/usr/local/lib/lw/psnf:\
> :tf=/usr/local/lib/lw/pstf:\
> :rf=/usr/local/lib/lw/psrf:\
> :vf=/usr/local/lib/lw/psvf:\
> :cf=/usr/local/lib/lw/pscf:\
> :df=/usr/local/lib/lw/psdf:
>
>..........
>HP_PaintjetXL
>I have a printcap that works for ARIES software running
>on a SPARCstation1 serial port for printing graphics
>images only! The images are created by the ARIES HP PaintJetXL
>driver software, and are printed on an HP PaintjetXL.
>
>DIP switch settings on the HP PaintJet XL were:
>
> ddduudd where "d" is down and "u" is up
>
>These DIP settings correspond to 9600 baud, even parity, XON/XOFF.
>
>lp|pjet|Hewlett-Packard PaintjetXL printer:\
> :lp=/dev/ttya:sd=/var/spool/pjet:\
> :ms=pass8,-opost,-onlcr,ixon,ixoff:
>
>..........
>For HP plotters, we find that the following settings are usually helpful:
>
>1. The latest serial port patch for 4.0.1 or 4.0.2
>
>2. The same printcap entry as above.
>
>3. Plotter settings:
>
>HP7595 Draftmaster I and HP7596 Draftmaster II
>----------------------------------------------
>Serial:
> Dataflow= Remote, Standalone
> Baud=9600
> Hardwire=on/off
> HP/IB=Address 05
> Bypass=off
> Duplex=full
> Auto-disc=off
>
>Similar settings work on the other HP plotters such as the 7580 and 7585.
>
>
>..........
>
>HP ThinkJet printcap
>
>here's the thinkjet one but it needs a bodge script in order to set the line characteristic correctly.
>the script is
>+++++++++++++++++++++++++ CUT HERE+++++++++++++++++++
>#!/bin/sh
>sleep 1500 >/dev/ttyb &
>stty cs7 ixoff ixon >/dev/ttyb
>lpr -Plocal $1
>+++++++++++++++++++++++++++++++++++++++
>and the printcap entry...
>++++++++++++++++++++++++ CUT HERE ++++++++++++++++++++++++++++
>thinkjet:\
> :lp=/dev/ttyb:sd=/usr/spool/local:\
> :lf=/usr/spool/local/lw-log:af=/usr/adm/lw.acct:\
> :br=9600:fs#06320:sh:
>
>..........
>IBM_ProPrinter
>#
># printcap entry for IBM ProPrinter attached to serial port of Sun
>3/60.
>#
># The IBM Proprinter requires a parallel to serial converter and
># an cable of the following configuration:
>#
>#
> Sun
> | 2 3 4 5 6 7 20 |
> |________________|
> | | |
> | | |
> \ / |
> / \ _
> | | / \ / | \
> ------------------
> | 2 3 4 5 6 7 20 |
> | |
>
> Proprinter
>
> Pins 2 to 3, 3 to 2, 7 to 7, 4 to 5 on ProPrinter side,
> and 6 to 20.
>
>
>mylw|carl|IBMcarl:\
> :lp=/dev/ttya:\ # serial port on Sun
> :br#9600:\ # baud rate
> :fs#06021:\ # automatic flow control...xon/xoff
> :tr=\f:\
> :of=/usr/lib/lpf:\ # output filter
> :sd=/usr/spool/mylw:\ # spooling directory
> :lf=/usr/spool/mylw/errs: # log file
>
>
>
>..........
>
>Inca Printers
>
># @(#)printcap.hp 1.2 4/17/85
>#
># Inca Printers
>#
>hp|lp|tjtest:\
> :br#9600:lp=/dev/ttya:fs#06021:of=/usr/erh/inca/bin/sd.hp:\
> :lf=/usr/adm/lpd-errs:fc#0777:pl#60:xc#07737:xs#040:sd=/usr/spool/hp:
>ep|epson|Epson printer:\
> :lp=:rm=apollo:rp=ep:sd=/usr/spool/ep:
>
>
>..........
>
>LW II in diablo mode
>
>Customer (s/o # 318926) needed to make LaserWriter II work in Diablo mode.
>The cusomter could cat a file to the printer fine, but when lpr'ing the
>file did not receive the proper CR/LF sequence. I had the customer change
>his printcap entry to the following and it worked! (I hit the floor in
>shock).
>
>lp:\
> :lp=/dev/ttya:\
> :lf=/var/spool/lp:\
> :br#9600:pw#80:fs#06020:fc#0300:xc#040:
>
>..........
>
>
>Laserwiter plus
>
>0|lp|lw|ps|purchprint|crackle|PostScript|LaserWriter|laserwriter|postscripta|Apple:\
> :lp=/dev/lw:br#9600:\
> :fc#0000374:fs#0000003:xc#0:xs#0040040:rw:\
> :if=/usr/doctools/lib/psif:of=/usr/doctools/lib/psof:\
> :gf=/usr/doctools/lib/psgf:nf=/usr/doctools/lib/psnf:\
> :tf=/usr/doctools/lib/pstf:\
> :vf=/usr/doctools/lib/psvf:\
> :sd=/usr/spool/lpd0:lf=/usr/spool/lpd0/log:\
> :mx#0:sf:sb:
>
>..........
>
>Laserwriter plus
>
>0|lp|lw|ps|purchprint|crackle|PostScript|LaserWriter|laserwriter|postscripta|Apple:\
> :lp=/dev/lw:br#9600:\
> :fc#0000374:fs#0000003:xc#0:xs#0040040:rw:\
> :if=/usr/doctools/lib/psif:of=/usr/doctools/lib/psof:\
> :gf=/usr/doctools/lib/psgf:nf=/usr/doctools/lib/psnf:\
> :tf=/usr/doctools/lib/pstf:\
> :vf=/usr/doctools/lib/psvf:\
> :sd=/usr/spool/lpd0:lf=/usr/spool/lpd0/log:\
> :mx#0:sf:sb:
>
>
>..........
>
>Monotype Lasercomp Typesetter
>
>/etc/printcap
>
># Monotype Lasercomp for Vision Control.
>#
>lc|lasercomp:\
> :lp=/dev/ttyb:fc#0177777:fs#0300:xs#040040:br#9600:
>#
>#
>
>add lines to /etc/rc.boot
>
>cp /dev/ttyb /dev/null &
>
>..........
>
>NEC LC890 (it works!)
>
>We use the following printcap entry for postscript printing with our NEC LC890
>printer (with Frame software):
>
># POSTSCRIPT PRINTER
>lw|ps|postscript|PostScript:\
> :lp=/dev/ttya:\
> :sd=/usr/spool/ps:\
> :lf=/dev/console:\
> :br#9600:\
> :rw:\
> :fc#0000374:\
> :fs#0000003:\
> :xc#0:\
> :xs#0040040:\
> :mx#0:\
> :sf:\
> :sh:
>
>When we want to use the LC-890 in Laserjet mode, we use the following:
>
>#LASERJET PRINTER
>hp|hplaserjet:\
> :lp=/dev/ttya:\
> :sd=/usr/spool/lj:\
> :br#9600:mx#0:\
> :fc#0300:\
> :fs#00020:\
> :sh:lf=/usr/adm/lpd-errs:
>
>..........
>
>NEC LC 890
>
>#
># HP pen plotter, connected locally
>#
>hp|hpplotter|hp7550A|Hewlett-Packard pen plotter in 1E404:\
> :lp=/dev/tty02:sd=/usr/spool/hp:\
> :lf=/usr/spool/hp/log:af=/usr/spool/hp/acct:\
> :br#9600:fc#0377:fs#0221:mx#0:\
> :rw:sh:sb:fo:\
> :ff=\033.J\033.P1\:\033.T\:\nPG;\n:\
> :of=/usr/local/lib/vp/hpfilter:
>#
>..........
>Settings for Operating Okidata Microline 391 via RS232 Serial Port (/dev/ttya)
>==============================================================================
>
>/etc/printcap:
>==============
># Basic Control for Okidata -- modify as needed
>lp|oki24|oki|okidata midroline391:\
> :br#9600:lp=/dev/ttya:\
> :sd=/usr/spool:tr=\f:
>
>System settings:
>================
>PRINTER oki
>lp oki
>stty 9600
>
>Cable:
>======
>Pins 2&3 reversed
>
>Okidata Printer settings:
>=========================
>Font Print Mode Utility
>General Control Emulation Mode Epson LQ
>Vertical Control Line Spacing 6 LPI
>Symbol Sets Character Set Set I
>Serial I/F Option Parity None
>Serial I/F Option Serial Data 7 or 8 Bits 8
>Serial I/F Option Protocol X-ON/X-OFF
>Serial I/F Option Diagnostic Test No
>Serial I/F Option Busy Line RTS
>Serial I/F Option Baud Rate 9600 BPS
>Serial I/F Option DSR Signal Invalid
>Serial I/F Option DTR Signal Ready on Select
>Serial I/F Option Busy Time 200 Milliseconds
>
>..........
>
>PRINTRONIX P600 parallel printer
>
>
>lp|printer|Printronix Parallel Printer:\
> :lp=/dev/mcpp0:sd=/var/spool/lpd:\
> :fo:mx#0:of=/usr/lib/lpf:lf=/usr/adm/lpd-errs:
>
>..........
>
>Plotters and Sparcstation 1's
>
>I sent the following printcap to a customer that was having problems with
>an Inter plotter and a Bruning plotter on the SS1:
>
>inter:\
> :lp=/dev/ttya:sd=/var/spool/inter:br#9600:rm=intcad:rp=inter:\
> :fs#06021:fc#0777:sb:sh:sf:xc#07737:xs#040:
>
>This printcap took care of his problems and he said it is working fine.
>
>..........
>
>Print-A-Color color printers
>
> Try these, no guarantees.
># Print-A-Color color printer
>#
>pac:\
> :lp=/dev/pac:sd=/usr/spool/lppacd:sh:xs#040:
>
>paclp:\
> :lp=/dev/pac:sd=/usr/spool/lppaclpd:sh:xc#040:
>
>
>..........
>
>Printronix with electronic vertical forms control
>
># printronix with electronic vertical forms control
>8|lp8|pp8|printronix-w-evfu:\
> :sd=/usr/spool/lpd:sh:sf:lf=/usr2/util/.printer.log:\
> :br#9600:fc#0177777:fs#0000060:lp=/dev/tty0a:xc#0177777:xs#000000:
>
>..........
>
>Printronix w/tab support
>
># printronix with tab support
>5|lpt|pr-tab|printronix:\
> sd=/usr/spool/lpt:lf=/usr2/util/.printer.log:\
> br#9600:fc#0177777:fs#0006000:lp=/dev/tty0a:xc#0177777:xs#000000:
>
>..........
>
>Printronix text only
>
># printronix text only
>0|lp|pp|printronix:\
> :sd=/usr/spool/lpd:lf=/usr2/util/.printer.log:\
> :br#9600:fc#0177777:fs#0006000:lp=/dev/tty0a:xc#0177777:xs#000040:
>
>..........
>
>TI810
>
># texas instruments 810 (text only)
>7|lp7|ti-810:\
> :sd=/usr/spool/ti-810:lf=/usr/adam/printer.log:\
> :br#4800:fc#0177777:fs#0006000:lp=/dev/tty0f:xc#0177777:xs#000000:
>
>..........
>
>Tektronix plotter
>
># Tektronixs plotter
>4|lp4|plotter:\
> :sd=/usr/spool/plotter:sh:sf:lf=/usr2/util/.printer.log:\
> :br#9600:fc#0177777:fs#0000001:lp=/dev/tty09:xc#0177777:xs#040000:
>
>..........
>Versatec 8242
>
>#
># This is a sample of printcap suitable for a 8242 plotter
>#
>8242|Versatec:\
> :lp=/dev/vp0:sd=/usr/spool/lpd:pw#512:px#8192:py#8192:tr=\f:\
> :of=/usr/lib/vpf:if=/usr/lib/vpf:tf=/usr/lib/rvcat:\
> :cf=/usr/lib/vdmp:vf=/usr/lib/vpltdmp:lf=/usr/spool/lpd-errs:
>
>..........
>Versatec 8836
>
>#
># This is a sample of printcap suitable for a 8836 plotter
>#
>8836|Versatec:\
> :lp=/dev/vp0:sd=/usr/spool/lpd:pw#880:px#14080:py#14080:tr=\f:\
> :of=/usr/lib/vpf:if=/usr/lib/vpf:tf=/usr/lib/rvcat:\
> :cf=/usr/lib/vdmp:vf=/usr/lib/vpltdmp:lf=/usr/spool/lpd-errs:
>..........
>
>
>
>
>
>
>

*********************************************************************

>From k@hprnd.rose.hp.com Thu Mar 25 11:01:44 1993
>Return-Path: <k@hprnd.rose.hp.com>
>Date: Thu, 25 Mar 93 09:01:05 -0800
>From: Steve Kao <k@hprnd.rose.hp.com>
>Message-Id: <9303251701.AA18804@hprnd.rose.hp.com>
>To: Bataller@sol.acs.uwosh.edu
>Subject: Sun & serial LJ-IIIP
>Content-Length: 4153
>X-Lines: 172
>Status: RO
>
>I looks like my e-mail to you hasn't bounced yet, so here's the first
>article. It describes how one of my customers got his LJ-IIIP to work
>on a Sun system via the serial port.
>- Steve Kao
>------------------------------------------------------------------------
>Steve -
>
>
>Here is what I have developed. I have tested with long files on a IIIP
>attached to serial port A (/dev/ttya) of my SPARCstation 2.
>
>If a printer must be attached to an external multiport port, such
>as Sun's ALM (Asynchronous Line Multiplexer), or to older Sun
>equipment, the instructions might be different.
>
>I think chris.kordish@East.Sun.COM has enhanced this to include
>ALMs; you might want to drop him a line if needed (just tell him
>I sent you).
>
>On some Sun desktop equipment you have a single A/B serial port; you may
>need an A/B splitter cable.
>
>Older Sun equipment does not have an EEPROM that is programmable.
>
>Finally, a Sun parallel port is referenced as "/dev/bpp0".
>
>Give it out to whoever wants it.
>
>
> - <name deleted>
> <address deleted>
>
>
>--------------------------------------------------------------------------
>
>
>Instructions for using an HP LaserJet printer running HP's PCL
>(Printer Control Language) on a Sun serial port.
>
>
>1. SERIAL CABLE:
>----------------
>
>You may use a standard 25-pin full null-modem serial cable,
>or use a straight-through cable and a full null-modem adapter,
>available from Radio Shack.
>
>A proper 25-pin full null-modem serial cable looks like this:
>
> 1 ------ 1
> 2 ------ 3
> 3 ------ 2
> 4 ------ 5
> 5 ------ 4
> 6 & 8 ------ 20
> 7 ------ 7
> 20 ------ 6 & 8
>
>
>
>HP LaserJets can also use the following 25-pin serial cable:
>
> 1 ------ 1
> 2 ------ 3
> 3 ------ 2
> 7 ------ 7
> 5 & 6 ------ 20
> 20 ------ 5 & 6
>
>
>
>
>2. PORT SETUP:
>--------------
>
>As superuser, you may use the "eeprom" command
>to set and verify EEPROM values.
>
>Sun EEPROM values for the serial port the printer
>is attached to (in this case, /dev/ttya):
>
>ttya-rts-dtr-off=false
>ttya-ignore-cd=true
>ttya-mode=9600,8,1,n,-
>
>
>
>3. SOFTWARE SETUP:
>------------------
>
>Following is a simple HP-PCL print filter and sample printcap entry.
>This will allow an HP LaserJet running PCL to print ASCII files.
>
>1. It works at 19200 bps without problems, with long files.
>2. It does not throw a blank page at the end of the print job,
> but still prints the final page.
>3. It works with Robust XON=OFF (necessary if you ever want to
> communicate with the printer interactively).
>4. The filter script is somewhat self-documenting.
>
>
>
>HP printer setup:
>
>Robust XON=OFF
>RS-232 mode enabled
>Baud Rate=19200
>DTR Polarity=HI
>I/O=Serial
>
>
>
>A sample entry for /etc/printcap:
>
>#
># entry for an HP LaserJet running PCL
>#
>hp|HP LaserJet:\
> :lp=/dev/ttya:\
> :sd=/var/spool/printers/hp:\
> :lf=/dev/console:\
> :br#19200:\
> :rw:\
> :fs#0000003:fc#0000374:\
> :xs#040040:xc#000000:\
> :mx#0:sb:sh:\
> :of=/usr/lib/hplaserjet:
>
>
>
>Filter file /usr/lib/hplaserjet (permissions must be +x):
>
>#!/bin/csh -f
>#
># HP LaserJet print filter for PCL printers.
>#
># This sends an HP-PCL escape sequence, "^[&k2G"
># to the printer, so that:
># CR is mapped to CR
># LF is mapped to CR LF
># FF is mapped to CR FF
>#
># Note: The escape sequence below will be partially invisible when
># this file is printed or when viewed with utilities like cat.
>#
>/usr/bin/echo -n '&k2G'
>/usr/bin/cat
>if ($status == 0) then
> exit 0
>else
> exit 1
>endif
>
>
>
>IMPORTANT NOTES ABOUT THE PRINT FILTER:
>
>Please note that the full escape sequence may be partially invisible!
>
>The full escape sequence is: ^[&k2G
>
>The "^[" is actually one character, "CNTRL-[".
>The "^[" is the PCL escape character.
>The "&" is also important, but may be invisible.
>If you use vi, you must type: CTRL-V CTRL-[
>before you type &k2G for the escape sequence.
>Do not type "^" and "[" as separate characters.
>Do not try to copy and paste that line into vi.
>Copy and paste or drag and drop to textedit will work.
>
>
**********************************************************************
>From Jay.Corinha@East Fri Sep 4 02:46:34 1992
Date: Thu, 3 Sep 92 12:47:45 EDT
From: Jay.Corinha@East (Jay Corinha - SunSelect Technical Marketing)
To: tstech@Sun.COM, hrenton@Central
Subject: Re: Need printcap for HP LJIII si
Cc: David.Gant@Corp
Content-Length: 8107
Status: RO
X-Lines: 348

Hello:

These filters will perform well for a laserjet. There is an output filter and two input filters. The second input filter produces landscape output. Useful for database apps that are not LaserJet Saavy. You can use either one in a
printcap entry.

best of luck using them.

J

----- Begin Included Message -----
> I have come across this problem with PC-NFS PCs attempting to print
graphics and make font calls to laserjets directly attached to the server.
The PC-NFS part is set to raw however, the codes don't make it to the printer.
The solution was to incorporate some print filters that would pass the actual
file data to the printer. (my filter also sends a laserjet reset code so that
if the last user printed landscape, the printer gets reset between each job.)
I can send you the c source for both the input and output filters - this may solve your problem.
~~~

Hi.

Here are the filters - just write them to files, complie and edit your printcap to point to them for the in & out filters.

NOTE: The hpIII also works for series II and the old original.

##################
# out_hpIII.c
####################

/*

  This is used to print out the header page.

  This module should be the output filter in printcap.
  The input filter should be in_hpIII.

  BOTH filters must be in printcap

  This filter is for the HPLASER SERIES III

  It starts by sending standard reset (<esc>E) to the printer

  Laser jet expects to see CRLF on ascii files so we map LF
  to CRLF until we see an escape character. The escape char
  will be used by some word processer to reset fonts etc...

  From that time on just
       
        get a char then print a char
        get a char then print a char
        get a char then print a char
        etc...

*/

#include <stdio.h>
#include <ctype.h>
#include <signal.h>

#define ESCAPE 27 /* Escape character (decimal) */
#define SMILEY 1 /* SOH char */

int
main(argc, argv)
int argc;
char *argv[];
{

        register char
                c, /* incoming char */
                binary, /* 0 until first binary char found */
                done, /* 1 when at end of file */
                got_cr; /* 0 until we find cr */

        fputs("\033E",stdout); /* put out standard reset */

        done = 0;
        while (!done){
            switch (c=getchar()) {
            case EOF:
                     exit(0);

            case '\n':
                    if (!got_cr){
                       fputc('\r',stdout);
                       got_cr = 0;
                    }
                    break;

            case '\r':
                    got_cr++;
                    break;

            case '\031': /* end if header call input filter */
                    
                    if ((c = getchar()) == '\1'){
                       fflush(stdout);
                       kill(getpid(), SIGSTOP);
                       break;
                    }else{
                       ungetc(c,stdin);
                       c = '\031';
                    }
     
            default:
                    got_cr = 0;
                    break;
            }

            if (c != SMILEY) {
                fputc(c,stdout);
            }

        }/* while */
        exit(0);
}


##############
# in_hpIII.c
##############

/*

  This filter should be set up as the input filter in printcap
  The input filter is used to print out the actual file, the output
  filter is used to print out the header page

  The filter out_hpIII should be setup as the output filter for
  the same printer

  BOTH filters should be in printcap

  This filter is for the HPLASER SERIES III

  It starts by sending standard reset (<esc>E) to the printer

  Laser jet expects to see CRLF on ascii files so we map LF
  to CRLF until we see an escape character. The escape char
  will be used by some word processer to reset fonts etc...

  From that time on just
       
        get a char then print a char
        get a char then print a char
        get a char then print a char
        etc...

*/

#include <stdio.h>
#include <ctype.h>
#include <signal.h>

#define ESCAPE 27

int
main(argc, argv)
int argc;
char *argv[];
{

        register int
                c, /* incoming char */
                binary, /* 0 until first binary char found */
                done, /* 1 when at end of file */
                got_cr; /* 0 until we find cr */

        binary = done = 0;
        while (!done){

            switch (c=getchar()) {

            case EOF:
                     done++;
                     break;

            case '\n':
                    if (!binary){
                       if (!got_cr){
                          fputc('\r',stdout);
                          got_cr = 0;
                       }
                    }
                    break;

            case '\r':
                    got_cr++;
                    break;

            case ESCAPE:
                    binary++;
                    break;

            default:
                    got_cr = 0;
                    break;
            }

            if (!done) fputc(c,stdout);

        }/* while */
        
         fputs("\033E",stdout); /* put out standard reset */
        exit(0);
}


################
# land_in_hpIII.c
################

/*

  This filter should be set up as the input filter in printcap.
  The input filter is used to print out the actual file, the output
  filter is used to print out the header page.

  The filter out_hpIII should be setup as the output filter for
  the same printer.

  BOTH filters should be in printcap.

  This filter is for the HPLASER SERIES III. (It has been tested.)

  It starts by sending standard reset (<esc>E) to the printer and it follows
  by sending the codes for landscpae compressed. Use this filter in another
  printcap entry for the same printer so that people can get their jobs
  printed sideways without changing the application. This works great for
  database reports and spreadsheets!

  This file modified to send the escape codes to call up landscape
  orientation and the compressed "line printer" font.

  Laser jet expects to see CRLF on ascii files so we map LF
  to CRLF until we see an escape character. The escape char
  will be used by some word processer to reset fonts etc...

  From that time on just
       
        get a char then print a char
        get a char then print a char
        get a char then print a char
        etc...

*/

#include <stdio.h>
#include <ctype.h>
#include <signal.h>

#define ESCAPE 27

int
main(argc, argv)
int argc;
char *argv[];
{

        register int
                c, /* incoming char */
                binary, /* 0 until first binary char found */
                done, /* 1 when at end of file */
                got_cr; /* 0 until we find cr */

        binary = done = 0;
        while (!done){

            switch (c=getchar()) {

            case EOF:
                     done++;
                     break;

            case '\n':
                    if (!binary){
                       if (!got_cr){
                          fputc('\r',stdout);
                          got_cr = 0;
                       }
                    }
                    break;

            case '\r':
                    got_cr++;
                    break;

            case ESCAPE:
                    binary++;
                    break;

            default:
                    got_cr = 0;
                    break;
            }

            if (!done) fputc(c,stdout);

        }/* while */
        
         fputs("\033&l1o\033(s16.66H",stdout); /* put out standard reset */
        exit(0);
}

----- End Included Message -----

==> From news@news2me.EBay Thu Sep 3 12:07:47 1992
==> To: tstech@Sun.COM
==> X-Reflected-By: news@news2me.EBay.Sun.COM
==> Path: news2me.ebay.sun.com!cronkite.Central.Sun.COM!texsun!mach1!hrenton
==> From: hrenton@Central (Howard Renton SE Grand Rapids, MI)
==> Newsgroups: sun.tstech
==> Subject: Need printcap for HP LJIII si
==> Sender: news@texsun.Central
==> Reply-To: hrenton@Central
==> Lines: 12
==> Content-Length: 174
==> X-Lines: 12
==>
==>
==> Hi All,
==>
==> This must be my week for printers!
==>
==> I need a printcap for an HP LaserJet III si printer. It's not in Version 5 of Printcap
==> City. Anyone have this?
==>
==> TIA,
==> Howard
==>
==>
==>

!! Erik M. Bataller | Phone: (414) 424-0347 | Univ. of Wi., Oshkosh
!! Academic Computing Services | 800 Algoma Blvd., 307 Dempsey,
!! Oshkosh, Wi. 54901-8602 | Internet: Bataller@sol.acs.uwosh.edu
!! Bitnet: Bataller@oshkoshw.bitnet



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:39 CDT