[cups.general] complicated

Erik Thiele erik at thiele-hydraulik.de
Mon Feb 7 08:06:10 PST 2005


hi

i have 2 problematic printers.
from one i don't know it's name (i'll call it mita),
the other one is a large format oce 9300 printer.

for the "mita" i have written this:



#! /bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin
set -e

TDIR=/tmp/mitafilter_$$
mkdir -m 700 "$TDIR"

function cleanup()
{
    rm -rf "$TDIR"
}
trap cleanup EXIT

function usage()
{
cat 1>&2 <<EOF
mitafilter.sh 600 a3    2
              dpi paper numcopies
reads stdin, writes stdout
this filter converts postscript to mita raw format
EOF
exit 1
}

if [ "$1" = "" ]; then
    usage
fi
if [ "$2" = "" ]; then
    usage
fi
if [ "$3" = "" ]; then
    usage
fi

cd "$TDIR"

gs -q -dSAFER -dNOPAUSE -dFIXEDMEDIA -r"$1" -dCompressionMethod=3 \
  -sDEVICE=pcl3 -sPAPERSIZE="$2" -sOutputFile=raw.%05d \
  -sMediaConfigurationFile=/usr/local/lib/mitafilter/mitakop.mcf - -c quit

<<<<< CONTENT OF mitacop.mcf:
unit mm
A4 4.5 8 3 11.5
A3 7.5 4 2 10.5
<<<<< END

echo -en "\33%-12345X"
echo -en "@PJL \n"
echo -en "@PJL JOB NAME =\"Using Comments\"\n"
echo -en "@PJL SET COPIES = $3\n"
# das set copies ding funktioniert nicht...
echo -en "@PJL SET ECONOMODE = OFF\n"
echo -en "@PJL SET IOBUFFER = OFF\n"
echo -en "@PJL SET PAGEPROTECT = ON\n"
echo -en "@PJL SET RET = ON\n"
echo -en "@PJL SET JAMRECOVERY = OFF\n"

echo -en "@PJL ENTER LANGUAGE = PCL\n"

for a in raw.*; do
    cat "$a"
    echo -en "\33E"
done

echo -en "\33%-12345X"
echo -en "@PJL \n"
echo -en "@PJL EOJ\n"
echo -en "\33%-12345X"



now how do i put this into cups?
as far as i understood, there are no cups
drivers. the cups-ddk refers to things that do not exist like
rastertopclx and so on. also my printer list on localhost:631
does not contain any but some about 10 printers from cups. the rest comes
from foomatic. i read the cups-ddk docs a bit, also i read
the foomatic docs.

so i thought i should use foomatic. but i cannot edit this, because i seem
to have to insert my printer to many xml files, it seems there is some
frontend. if i make changes myself they get deleted on next update.
also i don't find documentation about the one and only most important thing:

papersize, and paper orientation!

first i would need example postscript files in every paper size and
both in portrait and landscape orientation. they have to be viewable
with "gv" correctly. i should use these files to verify that my
printing works.

then... how does it work? where do i specify the printer offsets and
these paper issues? i don'T have no clue.

for the oce9300 printer i found out that i need to make a header like this:

BEGMF "Oce 9300, version_3.2";
MFVERSION 1;
MFDESC "Oce RCF, Version=2.5, Type=Header, Unit=Metric";
APPLDATA 002 "CO=1";
APPLDATA 021 "BY=0, RS=0, RN=2";
APPLDATA 003 "RO=0";
APPLDATA 023 "CI=0";
APPLDATA 014 "PM=0";
APPLDATA 059 "LG=6";
ENDMF;

afterwards i paste the output of:

gs -q -sDEVICE=tiffg4 -r300 -sOutputFile=- "$in"

then the printer prints. HP-RTL should be better though. i wrote my own
RTL generator, although some cups docs say there is a rastertortl, but
i don't find it.


i spend so many days on printing issues. i'll stick with my proprietary scripts
as i can edit and change them when i need. but cups and foomatic i don't
understand.

really, this whole thing is so mega-complex. i don't know who does the
printer drivers in linuxprinting.org. must be some guru

the general point that i don't get in my head is that i can easier write
a hp/gl parser with connected postscript writer and a HP-RTL writer for
my special printing problems (actually i wrote all these things) than
to understand cups or foomatic.



cya!
erik





More information about the cups mailing list