From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,61a07a883bd8f2b6 X-Google-Attributes: gidfee84,public From: "Scott Collins" Subject: Re: Help printing from Alpha to Lexmark RT Date: 1998/02/15 Message-ID: <6c7fuo$729@mercury.galstar.com>#1/1 X-Deja-AN: 325325202 References: <34e62c84.38794455@news.uth.tmc.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Galaxy Star - Northeastern Oklahoma Internet Newsgroups: comp.unix.osf.osf1 David, The printer sounds as though it is fully able to act as an lpd print server and I assume that it auto-senses Postscript or PCL input. It sounds as though straight text input (which goes through the PCL interpreter) is your problem. If the formatting has a kind of stairway effect, where each new line starts horizontally where the previous line ended, I know what your problem is. DOS/Windoze supply CR/LF (carriage return & line feed) pairs to terminate lines which is the default for most printers. UNIX however ends each line with only a LF which does not reset the cursor position to the left margin on printers configured like this. You have three options. Use a utility such as "mpage" which formats your output and sends it to the printer as postscript, reconfigure the printer to act properly with just LF characters to terminate lines, or use a printcap file which resets the printers PCL interpreter to treat lone LF's properly. Following is a korn shell script which contains a printcap file which resets the printers PCL interpreter to treat lone LF's properly by using the script. ================================================ #!/bin/ksh # # Name: hpljf # Author: Scott Collins # Purpose: HP Laserjet UNIX printer filter # # Directions: # Place this file "hpljf" into /usr/local/bin. This file is the # printer filter. The file paths to the binaries in this script may # need to be changed for your system. # ####################################################################### # Set up your printer in the /etc/printcap. Add the following # text in it, or whatever paths are appropriate to your system. # # # lp0|lj|0:\ # :lf=/usr/adm/lp0err:\ # :lp=:\ # :rm=printer.name.here:\ # :rp=ps:\ # :if=/usr/local/bin/hpljf:\ # :mx#0:sh:\ # :sd=/usr/spool/lpd0: # ####################################################################### PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin echo -ne "\033E\c" # reset printer echo -ne "\\033)0B\c" # secondary character set line draw echo -ne "\\033&k2G\c" # set line termination mode cat echo -ne "\\f" ========================================================= David S. Loose-Mitchell wrote in message <34e62c84.38794455@news.uth.tmc.edu>... >Anyone out there know how to write the princap file for a Lexmark >printer from OSF 3.2c? The Lexmark is a true network printer in that >it has its own netcard and runs LPR/LPD; it supports both postscript 1 >and 2 and HPL-5. I can sent data to the printer with no problem but >it's woefully misformatted. > >Cheers, >David