Hi again,
here is the result of test:
I run script:
==============
#!/bin/sh
# sendhp.sh
cp /dev/null /tmp/log
cp /dev/null /tmp/out
IP=130.225.128.63
ifhp=/usr/local/libexec/filters/ifhp
$ifhp -Tdev=$IP%9100,config=/etc/ifhp-test.conf,trace,model=hp2200 <
test-ifhp.sh 2>&1 | tee /tmp/log
==============
output from script:
============#
/home/longina/Diverse> ./test-ifhp.sh
ifhp 16:41:07.554 [585] main: using model 'hp2200'
ifhp 16:41:07.567 [585] Check_pagecount: pagecount using 'pjl info
pagecount'
ifhp 16:41:07.567 [585] Process_job: setting up printer
ifhp 16:41:07.567 [585] Do_sync: getting sync using 'pjl echo'
ifhp 16:41:08.123 [585] Check_device_status: id = '"HP LaserJet 2200"'
ifhp 16:41:08.128 [585] Do_sync: sync done
ifhp 16:41:08.132 [585] Do_pagecount: pagecounter 76789 after 1 attempts
ifhp 16:41:08.133 [585] Do_accounting: pagecounter 76789
ifhp 16:41:08.134 [585] Process_job: sending job file
ifhp 16:41:08.134 [585] Send_job: starting transfer
ifhp 16:41:08.134 [585] Use_file_util: file program = '/usr/local/bin/file
-'
ifhp 16:41:08.191 [585] Filter_file: started FILE_UTIL- 'file'
ifhp 16:41:08.252 [585] Use_file_util: file information =
'a_/bin/sh_script_text_executable'
ifhp 16:41:08.253 [585] Send_job: initial job type
'a_/bin/sh_script_text_executable'
ifhp 16:41:08.255 [585] Send_job: decoded job type 'POSTSCRIPT'
ifhp 16:41:08.256 [585] Send_job: job type 'POSTSCRIPT', converter
'/usr/local/bin/a2ps -q -B -1 -M A4 --borders=no -o- DEVFD0'
ifhp 16:41:08.309 [585] Filter_file: started CONVERTER- 'a2ps'
ifhp 16:41:08.488 [585] Filter_file: 'CONVERTER' error msg 'a2ps: cannot
open file `DEVFD0': No such file or directory'
ifhp 16:41:08.489 [585] Send_job: converter done, output 0 bytes
ifhp 16:41:08.489 [585] Send_job: zero length conversion output
ifhp 16:41:08.491 [585] Send_job: transferring 0 bytes
ifhp 16:41:08.492 [585] Send_job: zero length job file
ifhp 16:41:08.493 [585] Process_job: sent job file
ifhp 16:41:08.494 [585] Do_waitend: getting end using 'pjl job/eoj'
ifhp 16:41:09.176 [585] Do_waitend: end of job detected
ifhp 16:41:10.121 [585] Do_pagecount: pagecounter 76789 after 1 attempts
ifhp 16:41:10.122 [585] Do_accounting: pagecounter 76789, pages 0
ifhp 16:41:10.122 [585] Process_job: done
=================
Does the expansion of \%s {file_input} doesn't work in
ifhp.conf????:
====
My ifhp.conf (changed forceconversion mode):
=====
default_language=text
forceconversion
## UNIX File utility path
file_util_path= /usr/local/bin/file \%s{inputfile}
^^^^^^^^^^^^^^^
## Patterns and Converters
# example conversion program
file_output_match = [
*postscript* ps
*pdf* ps \%s{pdf2ps_converter}
*pcl* pcl
*pjl* pjl
#\%s{pjl_converter}
*printer*job*language* pjl
*text* ps \%s{text_converter}
*gzip_compressed* filter \%s{gzip_decompress}
* msg no_converter
]
ps_no_converter = %!PS-Adobe-3.0
/Courier
findfont 10 scalefont setfont
72 500 moveto
(No conversion available for type '\%s{file_output}') show
showpage
no_converter = No conversion available for type '\%s{file_output}'
ps_conversion_error = %!PS-Adobe-3.0
/Courier
findfont 10 scalefont setfont
72 500 moveto
(Conversion failed for type '\%s{file_output}') show
72 480 moveto
(Using '\%s{pgm}') show
72 460 moveto
(Error: '\%s{msg}') show
showpage
conversion_error = Conversion failed for type '\%s{file_output}'
Using '\%s{pgm}'
Error: '\%s{msg}'
# gs_device=epsonc
# gs_options=-r240x72
# gs_converter= /usr/local/bin/gs -dSAFER -dPARANOIDSAFER -dBATCH
#-dNOPAUSE -q '-sO\utputFile=/dev/fd/3' 3>&1 1>&2
# \%s{gs_options} \%s{inputfile}
#
#
#gs_converter= /usr/local/bin/gs -dSAFER -dPARANOIDSAFER -dBATCH
#-dNOPAUSE -q '-sO\utputFile=/dev/fd/3' 3>&1 1>&2
#-sPAPERSIZE=\%L{papersize} -sDEVICE=\%s{gs_device} \\%s{gs_options}
#\%s{inputfile}
#gs_unidriver= /usr/local/bin/gs -dSAFER -dPARANOIDSAFER -dBATCH
#-dNOPAUSE -q '-sO\utputFile=/dev/fd/3' 3>&1 1>&2
#-sPAPERSIZE=\%L{papersize} @\%s{gs_device} \%s{gs_op\tions}
#\%s{inputfile}
a2ps_options= -q -B -1 -M \%M{papersize} --borders=no -o-
a2ps_converter= /usr/local/bin/a2ps \%s{a2ps_options} \%s{inputfile}
pdf2ps_converter= /usr/local/bin/gs -dSAFER -dPARANOIDSAFER -dBATCH
-dNOPAUSE -q '\-sOutputFile=/dev/fd/3' 3>&1 1>&2 -sDEVICE=pswrite
\%{pdf2ps_options} -c save pop -\f \%s{inputfile}
ps_converter=
pcl_converter=
pjl_converter=
text_converter=\%s{a2ps_converter}
====
What I make wrong?
regards
Longina
--
Longina Przybyszewska, system programmer
Dept. of Math. & Comp. Sci. - IMADA
University of Southern Denmark, Odense
Campusvej 55,DK-5230 Odense M, Denmark
tel: +45 6550 2359 - http://www.imada.sdu.dk email: [EMAIL PROTECTED]
--
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
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.
-----------------------------------------------------------------------------