Newbie lpd printing
mwm-dated-1050510081.63557c at mired.org
Fri Apr 11 09:21:24 PDT 2003
In <200304102145.25225.gwschenk at socal.rr.com>, Gary Schenk <gwschenk at socal.rr.com> typed:
> This FreeBSD newbie has even learned how to print! I'm using lpd to print and
> it works fine from the console. I'm using an old Epson with the hpif filter
> from the FreeBSD handbook, using uniprint as the device.
> However, it does not work in KDE. I've read the KDE printing handbook, but
> have not found much there.
> It seems to be an input filter problem. My /etc/printcap file calls on hpif,
> which does print text files to the Epson just fine, yet the results I get in
> KDE seem to indicate that the input filter is not working. Does KDE use
> /etc/printcap? Have I missed something in setting up printing for KDE?
> Basically all I've done is click "print" in the application, choose lpd, and
I suspect your script is broken for printing postscript files. The
hpif script in the handbook doesn't handle those at all, so I assume
you added that code.
Can you print postscript from the command line? If not, the KDE is
probably turning everything into postscript, which is then failing.
> I'm not good at scripts yet, so maybe that is the problem? Here is my input
> filter file:
I see two problems. One is that you run ghostscript twice, the first
time sending the output to /dev/fd/3, which won't do any good. The
second time won't get any data. You also need to do the printf
\033&k2g for postscript, and it may put your printer into PCL mode for
the job. That should only happen for text files.
If you're only going to print from KDE, then fixing this script might
be the way to go. However, installing something like magicfilter - and
you've already got the hard parts done - which handles the difference
between postscript and flat text properly, and automatically converts
a number of formats to postscript for you, might be a better option if
you want to print regularly from the command line.
Mike Meyer <mwm at mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
More information about the freebsd-questions