[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference kernel::unix_printing

Title:Printing from UNIX
Moderator:KERNEL::COFFEYJ
Created:Thu Dec 17 1992
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:956
Total number of notes:2876

924.0. "How to print wider than 132 characters?" by CSC32::D_MATTHIES () Fri Mar 21 1997 21:47

    Hi All,
    	To start with I have read note 496.  .1 says 132 is the maximum for
    the hplaser filter.  Is this the maximum for all filters.  Can this be
    changed in the filter by a Customer or do they need to do the
    "addescape" thing?  What is the maximum for printcap pw?
    	I never have any problems telling a Customer that they will need to
    do their own thing.  I just want to make sure that there is not an
    easier way.
    
    dave,
T.RTitleUserPersonal
Name
DateLines
924.1KERNEL::COFFEYJLa Feline Flooz - a unix catMon Mar 24 1997 17:5212
132 is the maximum for lpd to manage if you specify a width. 

In some cases by not defining a width and using xf people 
have got more printing simply because that just does a cat, 
and of course Postscript controls all that itself and 
doesn't really have a character size as standard so can't 
have it's page width measured in characters. 

Dependant on what your customer is trying to do it sounds 
like xf might do what you need. 

Jo
924.2SMURF::LABONTEMon Mar 24 1997 20:3224
Page width limits are imposed by printcap pw, lpr -w, and the print filter.
In this case lpr -w and printcap pw yield the same results.

The print daemon uses the printcap pw to specify the page width. The
internal size of pw is a signed int so this should not impose any width
issues. The print daemon passes this value to the print filter. The filter
can choose to use the pw value or ignore it. The /usr/lbin/xf filter script
ignores the pw value. It is also common for filters processing postscript
files to ignore the pw value. However, filters converting text files to
postscript will probably use the pw value. Side note some filters use the
page width to activate landscape printing.

Many of the filters use an internal buffer to store a line of text for
processing. These filters will not allow a pw setting greater than the size
of the buffer. This is the reason for the 132 characters limit.

FYI, the pcfof filter (yet to be released) does not utilize an internal
buffer so the filter does not have a width limit. However it will not
auto-adjust the font size based on the page width.

Using the current release of Digital UNIX you can create a special filter
or preformat the file and use `lpr -x' which calls /usr/lbin/xf. If a
filter is created it will need to include printer commands to specify the
font size and probably the vertical pitch.
924.3KERNEL::COFFEYJLa Feline Flooz - a unix catTue Mar 25 1997 15:4717
Fair enough, it makes more sense the way you describe it, 
maybe digital unix is different, but the bit that always 
got me were the bits like:

from lp.local.h      #define DEFWIDTH        132

(and I double checked that happens in both dUnix and Ultrix)

I don't know if that's the main bit but I remember reading
the sources for a problem once and thinking why does it 
hard code it it there and imply in the man pages you have 
full control and choice, why not say in the man pages you 
can't set it beyond that? 


Maybe it's just the default now instead of the maximum... 

924.4SMURF::LABONTETue Mar 25 1997 17:175
lp.local.h      #define DEFWIDTH        132

is only used to define the default printcap pw value when pw is not specified
in the /etc/printcap file. DEFWIDTH is not an upper limit. You can set a
value greater than 132 however the filter may choose not to use the value.