Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2001 20:51:31 -0500
From:      Mike Meyer <mwm@mired.org>
To:        "Philip J. Koenig" <pjklist@ekahuna.com>
Cc:        questions@freebsd.org
Subject:   Re: Better printing from the command-line
Message-ID:  <15148.3363.52861.253822@guru.mired.org>
In-Reply-To: <6147922@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Philip J. Koenig <pjklist@ekahuna.com> types:
> However I'd like to do some *rudimentary* jazzing up of the 
> printouts, ie something as simple as setting the font to 12-pitch 
> instead of 10-pitch so that certain manpages and text documents 
> don't end up with truncated lines.  

From the sound of things, you're talking about printing flat ascii
text. Since these kinds of things aren't standardized, there really
isn't a generic tool for dealing with them. I've been thinking about
extending magicfilter to add the ability to specify strings to prefix
a print job, which might solve this, but haven't done anything yet.
Personally, I just set those the way I want them on the printer, and
forget about them.

> Even though I'm using the "magicfilter" port which has a specific 
> filter for the HP Laserjet, it doesn't appear to have any settings 
> which can do something as simple as change the font pitch.  I hear 
> good things about the "APSfilter" port but that appears to require X, 
> which I don't usually run.

apsfilter doesn't require X, but it defaults to using it if you build
it interactively. Build it with "make -DWITHOUT_X11" and it won't
require X. Hopefully, this will be changed in the future to default to
build without X if X isn't installed.

In any case, apsfilter doesn't send flat ascii text files to the
printer, so things like the printers font pitch setting don't
matter. It sends ascii text through a2ps, then prints the resulting
postscript. This can be an expensive operation if your printer prints
flat text and doesn't print postscript, and can even cause printouts
to fail on some printers. That's one of the reasons I recommend
magicfilter over apsfilter - magicfilter won't filter flat text
through postscript unless the printer can't handle flat text.

You can install the a2ps port yourself and do what apsfilter does by
hand if you're happy printing flat text through postscript. I prefer
enscript for this; it's also in the ports tree. Either one of them
have more options than you want to worry about for how to format the
text on the page.

> Is there any other kind of utility with a few basic built-in switches 
> to do minor formatting on a Laserjet 4MPlus?  This printer supports 
> Postscript too but it would seem simpler to just use PCL commands. I 
> hope I don't end up having to write my own scripts just to send 
> commands to the printer..

Ok, the only printer system that might do what you're thinking about
is CUPS. There's a demo of that in the ports tree. It uses the printer
description files that Windows uses, which tells the print system how
to do all these things. You may have to purchase the commercial
version to do what you want, though.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15148.3363.52861.253822>