Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 2003 19:04:02 +0100 (CET)
From:      "Hartmann, O." <ohartman@mail.physik.uni-mainz.de>
To:        cjh@freebsd.org
Cc:        freebsd-questions@freebsd.org
Subject:   magicfilter in FBSD 5.2 not working correctly
Message-ID:  <20031214183754.V12642@mail.physik.uni-mainz.de>

next in thread | raw e-mail | index | archive | help
Dear Sir.

Due to my bad English I will try to explain what kind of malfunktion I discovered
in the newest magicfilter 1.2 stuff. Prior to this malfunktion, I used magicfilter
in the desired way - fully functioning!

Base system is a FreeBSD 5.2-RC box acting as printserver for a couple of HP
network attached printers. Most of them are real PostScript printers with
Duplex facility and some colour printers have more than one paper tray which need
to be selected individually due to some transparencies inside some trays.

Here my specific problem.

I compiled ghostscript-gnu 7.07 from the ports and all the necessary stuff. I
also compiled a2ps-a4, psutils-a4 and magicfilter 1.2 as it is in the most recent
version.

My intention is to have one line for each PostScript printer which sets specific
PS parameters for each print queue, for example select tray 2 for transparencies or
coloured plain papers or select whether the document should be printed duplexed or
simplex (several scientific reports need to be printed simplex, others duplex).

For this reason I wrote a magicfilter-filter file with this entry:


------------ example ----------
# lj4600-00-05-162-auto-s-filter

0 %!            filter /usr/local/bin/psset -q --setpagedevice=LanguageLevel:3;Duplex:false;Tumble:false
0 \004%!        filter /usr/local/bin/psset -q --setpagedevice=LanguageLevel:3;Duplex:false;Tumble:false

for automatic tray selection, simplex print.

Another filter file shows


------------ example ----------
# lj4600-00-05-162-auto-d-filter

0 %!            filter /usr/local/bin/psset -q --setpagedevice=LanguageLevel:3;Duplex:true;Tumble:false
0 \004%!        filter /usr/local/bin/psset -q --setpagedevice=LanguageLevel:3;Duplex:true;Tumble:false

the same for duplex. I have three more with the --setpagedevice=MediaPosition:XX otion set to select the
tray. This works with original PS-documents great! And I confirm: with PS documents I can do everything
I want!

So, now I need to print PDF and plain ASCII and I did this before on FreeBSD 4.8 boxes with magicfilter 1.1
by adding a line at the end like this:

0 %PDF          fpipe         `/usr/local/bin/pdf2ps  $FILE - 2>/dev/null`

for converting PDF to PS files an reinject the output into the magicfilter to be printed
regarding to the PS-tags above (simplex, duplex, tray select and so on).

Another in the past working tag for plain ASCII conversion was this line:

-----
default   pipe    /usr/local/bin/a2ps -q -R --columns=1 -B -j --ppd -k --prologue=color -o -

(on a colour printer system).

I got output with borderlines and appropriate to the PS-tags above I could print duplex or simplex or
selective trays.


And this does not work anymore!


Every printer I examinded (HP LJ4000, LJ4100DTN, CLJ4500, 2x CLJ4600DTN, LJ III, LJ1100) I realized,
that the printed file was piped into the print queue as is, unconversted, unprocessed!

I reduced several magicfilter filter files up to four lines, the two for PostScript, one for PDF and
the last 'default' for conversion with a2ps to print stupdi ASCII plain text as PS data.


At last I will report, that I first used a working environment (printer setup, queue setup, magicfilter
setup, then I upgraded to FreeBSD 5.1 and the new magic filter stuff and since then nothing worked
as expected.
Another point seems to be that magicfilter isn't capable to inherit the ENVIRONMENT, so /usr/local/bin
is completely unknown if some filters like 'fixps' are needed. magicfilter should incorporate this
path, otherwise we need to link each needed program to /usr/bin and that's stupid stuff.


It would be nice if someone has some solutions out here.

By the way:

This works fine on stupid non-PS printers:


--------- HP DJ 1120C A3 format printer ------------
# dj1120-00-05-273-auto-s-filter

# PostScript
0 %! filter /usr/local/bin/gs -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj550 -sOutputFile=- -
0 \004%! filter /usr/local/bin/gs -q -dSAFER -dNOPAUSE -r300 -sDEVICE=cdj550 -sOutputFile=- -

# Acrobat PDF
0 %PDF          ffilter /usr/local/bin/gs -q -dSAFER -dNOPAUSE -r300 -sPAPERSIZE=a3 -sDEVICE=cdj550 -sOutputFile=-
$FILE -c
quit

----------------------

hope this helps. Many thanks for staying up to the end of my report and have patience.

Oliver



--
MfG
O. Hartmann

ohartman@mail.physik.uni-mainz.de
------------------------------------------------------------------
Systemadministration des Institutes fuer Physik der Atmosphaere (IPA)
------------------------------------------------------------------
Johannes Gutenberg Universitaet Mainz
Becherweg 21
55099 Mainz

Tel: +496131/3924662 (Maschinenraum)
Tel: +496131/3924144 (Buero)
FAX: +496131/3923532



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