Hi,

    I thought I would post this on the off chance someone else has the
same problem.


 The Problem
 ============

 The problem I had was that print jobs submitted from client machines
are treated differently with respect to filtering compared to those
submitted on the server machine.

 To be precise I have the following arrangement:


 Several `client' machines running LPRng-3.5.3

 One server machine running LPRng-3.7.4

 The server machines has several bounce queues which pass jobs onto
networked printers, all of which accept postscript.

 (The idea obviously is to keep all the clever stuff in one place so it
is easy to manage!)

 I use the ifhp filter, configured via ifhp.conf so that it  detects
text files and converts them to postscript using a2ps. This also allows
various options like duplex/simplex 2by2 etc to be implemented.

 I found that it only worked for print jobs submitted from  the server
machine.!!!!

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

 ( much hair tearing later...)

 The Solution
 ============

 I discovered that although in both cases lpd puts the file through the
filter, when the job originates from a client machine it calls the
filter with a -c option, which turns off most of what ifhp does, in
particular the text to ps conversion which I required.

 My solution was to replace the line
    :filter=/usr/local/lib/filters/ifhp 
           in my printcap with
    :filter=/usr/local/lib/filters/ifhp_wrapper.sh

   where the file /usr/local/lib/filters/ifhp_wrapper.sh is just:

 arg_list=`echo $* | sed 's/\ -c//' `     
 /usr/local/lib/filters/ifhp $arg_list

 it works !

 That's all folks!

        Alex
-- 

 Alex Finch, Research Officer, Physics Department, Lancaster University.
begin:vcard 
n:Finch;Alex
x-mozilla-html:FALSE
org:Lancaster University;Physics Dept.
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Research Fellow
x-mozilla-cpt:;0
fn:Alex Finch
end:vcard

Reply via email to