> From [EMAIL PROTECTED] Tue Aug  8 06:03:06 2000
> Date: Tue, 8 Aug 2000 15:02:28 +0200 (MEST)
> From: Philipp Cain <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: SYSV lp -o option
>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> Hello Mr. Powell,
>
> thank you for taking a look at this problem.
>
> This is the command line on the HP:
> lp -d fleet2 -olandscape test.ps
>
> The resulting debug messages come as attachment.
>
> For remote printing the HP SysV interface scripts starts rlp.
> According to the man pages there is no obvious way to add the
> -o options. But for remote printing (with rlp) from a HP to 
> another HP which runs a print server and then prints directly to the 
> network printer the options work.
>
> Thanks again, Philipp.
>
> -- 
> #######################################################################
> # Philipp Cain                 Office: +49/0 371 531 3144, Room: 566  #
> #                                                                     #
> # Institut fuer Physik                                                #
> # Technische Universitaet                                             #
> # 09107 Chemnitz, Germany      Email:  [EMAIL PROTECTED]     #
> #######################################################################

..... Skipping most of log file ... 

> 2000-08-08-14:43:51.606 spock [15294] RECV  fleet2: Find_last_key: cmp 1, top 1, mid 
>0, bot 1
> 2000-08-08-14:43:51.606 spock [15294] RECV  fleet2: Find_last_key: cmp -6, top 0, 
>mid 1, bot 1
> 2000-08-08-14:43:51.606 spock [15294] RECV  fleet2: Find_last_key: key 'filenames', 
>cmp -6, mid 1
> 2000-08-08-14:43:51.606 spock [15294] RECV  fleet2: Escape: ws 0, level 1, allocated 
>length 136, length 97, for 'Hpinochet
> Pcain
> Jfleet2-205
> C
> Lcain
> fdA0205pinochet
> UdA0205pinochet
> Ntest.ps
> A0
> N Olandscape
> N B
> '
> 2000-08-08-14:43:51.606 spock [15294] RECV  fleet2: Escape: final length 123 
>'Hpinochet%0aPcain%0aJfleet2%2d205%0aC%0aLcain%0afdA0205pinochet%0aUdA0205pinochet%0aNtest%2eps%0aA0%0aN?Olandscape%0aN?B%0a'
> 2000-08-08-14:43:51.607 spock [15294] RECV  fleet2: Add_line_list: 
>'cf_esc_image=Hpinochet%0aPcain%...', sep '        =#@', sort 1, uniq 1
> 2000-08-08-14:43:51.607 spock [15294] RECV  fleet2: Find_last_key: count 7, key 
>'cf_esc_image'

If you look at the log file,  you will discover that the 'N' lines have the option
information on them.  To be exact,  lines with 'N ' have the options.

a)  get the latest test version of LPRng:

ftp://ftp.astart.com/pub/LPRng/private/    <<< - look here for latest test version

b)  Install it.

In the printcap entry, add the following line:

pr...:   <- printcap entry
  :incoming_control_filter=/usr/local/libexec/filters/fixhp

Put the following in the /usr/local/libexec/filters/fixhp file:

#!/bin/perl
#  fix up the control file with HP options
#  Note that this must be done BEFORE processing the
#  control file
#
my(@file,@options,$options,$debug);
@file = <>;
print "file '" . join("','",@file) . "'\n" if $debug;
@options =
        grep /./,
        map { if(/^N O/){ $v= $_; chomp $v; $v =~ s/^N O//; $v; } else { "" } } @file;
print "option list '" . join("','",@options) . "'\n" if $debug;
$options = join(",",@options);
print "options '$options'\n" if $debug;
@file = grep !/^N /, @file;
print "new file '" . join("','",@file) . "'\n" if $debug;
if( $options ){
    if( not (grep { s/$/,$options/ if /^Z/; } @file) ){
                print "Z" . $options . "\n";
        }
}
print @file if @file;
exit 0;

Lets run through what happens:

The job arrives at the spooler.
The 'incoming_control_filter' program is run, producing the
  new control file.
The fixhp perl script will find all the 'N ' lines, extract
the options,  and then remove them.  It puts the
extracted 'N O' options into the Z line.

Enjoy

Patrick Powell                 Astart Technologies,
[EMAIL PROTECTED]            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.astart.com)

-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to