mb@rex.cs.tulane.edu (Mark Benard) (08/26/89)
I have just set up a Postscript printer on a tty port on a IOP/ITP on a 9815 running OSx4.4+. It works great with most filters that generate Postscript output, but I have one application that produces command lines with lengths that often exceed 132 characters. The system seems to be either truncating the lines at 132 or inserting other characters that cause the printer to choke. I have put in a pw value of 255 in the printcap entry for that printer, but that does not help. Should I be modifying the termcap entry for that tty port, or changing some port characteristic, to enable lines of length loner than 132 to pass through to the printer intact? By the way, I know it is not a problem with the printer, because it runs fine off of a VAX/VMS system with the files from this same application, and there is nothing I can do about modifying the applcation. -Mark -- Mark Benard Department of Computer Science INTERNET & BITNET: mb@cs.tulane.edu Tulane University USENET: rex!mb New Orleans, LA 70118
chris@yarra.oz.au (Chris Jankowski) (08/28/89)
In article <1066@rex.cs.tulane.edu> mb@rex.cs.tulane.edu (Mark Benard) writes: > I have just set up a Postscript printer on a tty port on a IOP/ITP on a 9815 > running OSx4.4+. It works great with most filters that generate Postscript > output, but I have one application that produces command lines with lengths > that often exceed 132 characters. The system seems to be either truncating > the lines at 132 or inserting other characters that cause the printer to > choke. > > I have put in a pw value of 255 in the printcap entry for that printer, > but that does not help. Should I be modifying the termcap entry for > that tty port, or changing some port characteristic, to enable lines > of length loner than 132 to pass through to the printer intact? > You need to do two things: 1. Set pw capability in the printcap entry for the printer to sufficiently high value eg. pw#300. 2. Do not use /usr/lib/lpf as a filter. (It is typicaly used as either if or of filter). Comment: The first is obvious. The second ie. real functioning of /usr/lib/lpf is not documented very well if at all. I have only some observations which are summarised below. It seems to me that /usr/lib/lpf is a hangover from the time of electric typewriter and drum and hammers lineprinter. It has the design philosophy of a such a printer deeply ingrained in its workings. 2. Standard accounting filter - /usr/ucb/lpf -------------------------------------------- 2.1. Indenting The filter does indenting. If the filter is not in a printcap entry of a printer (if=/usr/ucb/lpf) indenting option of lpr (-i option) will not work (unless you provide your own if filter doing that). 2.2. Control characters filtering. By default the filter replaces control characters (other than BS, CR, LF and FF etc.) with spaces. This may be disabled (ie. control characters are passed uninterpreted) by -l option of lpr. 2.3. Maximum width of printouts. The filter limits maximum width to 132 characters. ie if you specify pw#150 you still get lines chopped to 132 characters. 2.4. /usr/lib/necf filter - untried alternative. This filter may be better. It has been written with a dot matrix printer in mind peharps. 2.5. Treatment of line terminating characters and line overlay optimisation. In general lpf treats CR character (^M) as true carriage return ie. it assumes that characters following CR are to be printed in the same line but starting from the beginning of the line (overprinting). LF character (^J) is treated as new line character ie. start printing from the beginning of the next line. All this seems reasonable but then comes optimisation done by lpf and it often produces unexpected results. The optimisation seems to be a hangover from the time of extremely slow electrical typewriters when the main concern was to minimise platten movements. This works like follows: 1. If it finds CRLF or LFCR it filters out CR leaving only LF. There is no way I know about that you can switch off this filtering. If your printer needs both CR and LF you may try to have the following string as a line terminator: CRspaceLF. This should work in most cases. 2. If there is a line of text terminated by a CR and another line after this the filter will swap all spaces in the first line and chararacters from the coresponding positions in the second line. Those are just observations. I do not have access to the source code. Hope this helps. -m------- Chris Jankowski - Senior Systems Engineer chris@yarra.oz{.au} ---mmm----- Pyramid Technology Australia fax +61 3 820 0536 -----mmmmm--- 11th Floor, 14 Queens Road tel. +61 3 820 0711 -------mmmmmmm- Melbourne, Victoria, 3004 AUSTRALIA (03) 820 0711 "Knowing how things work is the basis for appreciation, and is thus a source of civilized delight." -- William Safire