Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 11:21:21 -0500
From:      Mike Meyer <mwm-dated-1050510081.63557c@mired.org>
To:        Gary Schenk <gwschenk@socal.rr.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Newbie lpd printing
Message-ID:  <16022.60289.92289.802228@guru.mired.org>
In-Reply-To: <200304102145.25225.gwschenk@socal.rr.com>
References:  <200304102145.25225.gwschenk@socal.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In <200304102145.25225.gwschenk@socal.rr.com>, Gary Schenk <gwschenk@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 
> ok.

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
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.



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