Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2001 00:13:20 -0500
From:      Mike Meyer <mwm@mired.org>
To:        "Michael O'Henly" <michael@tenzo.com>
Cc:        questions@freebsd.org
Subject:   Re: apsfilter vs. magicfilter
Message-ID:  <15086.17904.654310.339441@guru.mired.org>
In-Reply-To: <39565795@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael O'Henly <michael@tenzo.com> types:
> I have been using apsfilter, but not happily. It tries to do a lot more than 
> I need and I find it difficult to isolate where problems are occuring when I 
> have them. That's as much a comment about my inexperience with Unix printing 
> as anything else -- but I think I might learn more easily using a simpler 
> interface.
> 
> Is magicfilter the alternative you'd recommend? Are there any other filters 
> that I should be looking at?

It depends on what you want. apsfilter and magicfilter share the
property that they try and figure out what a file is, and render it
appropriately. There are other printer filters that don't do that, and
expect you to run a command that renders your document in postscript
(usually) before trying to print it.

apsfilter is built around using ghostscript as a front end to talk to
the printer. This causes extra work in cases where you don't need to
render things as postscript, and some problems if you're trying to
send postscript straight to a postscript printer.

magicfilter is built around translating files to something the printer
can handle, either internally or via external command. It's internal
translations include handling both text and postscript properly for
DOS printers. It also recognizes various printer rendering languages,
and will send those directly to the printer if appropriate.

As you've noticed, apsfilter is a large, complex shell script with
numerous configuration files, and figuring out what it's really doing
can be hard. Magicfilter is a relatlively small C program (which I've
never really looked at) that's the interpreter for magicfilter
scripts. The scripts are declarative, not procedural. Each line
specifies a way to identify a file - with an offset into the file, and
a string to look for that offset - and an internal action to invoke,
along with arguments for it. The internal actions either send the file
to the printer, filter it through an internal or external translator
before sending it to the printer, filter it as above before processing
it again, or reject it. While this can do everything that apsfilter
can do, configuration isn't nearly so complicated, so diagnosing
problems is simpler.

If you want automatic translation, I'd recommend magicfilter. If you
want to do things by hand, then all you really need is two printcap -
one that has a filter for text, and one that filters for postscript.

	<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?15086.17904.654310.339441>