Jon Hargreaves on Wed, 13 Feb 2002 14:02:48 +0100 (CET)(envelope-from owner-apsfilter-help@apsfilter.org)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

apsfilter bug: Fault logged when printing usning samba and lpr


I am having a few problems when attempting to print using samba and the lpd daemon and would appreciate some help!
 
>Error type: usage
>How to repeat: By printing a pdf document using lpr
>Error log:
+ PATH=/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin
+ umask 077
+ trap '' 1 13
+ trap 'rm -rf "$APS_TMPDIR"; exit $return_code;' 0
+ trap 'exit 9' 1 5 7 10 12 15
+ '[' 3 -gt 0 ']'
+ variable=
+ variable=HOST
+ '[' HOST ']'
+ value=dbserver.pfsuk.co.uk
+ '[' '!' dbserver.pfsuk.co.uk ']'
+ eval 'HOST="$value"'
++ HOST=dbserver.pfsuk.co.uk
+ shift
+ '[' 2 -gt 0 ']'
+ variable=
+ variable=USER
+ '[' USER ']'
+ value=jharg
+ '[' '!' jharg ']'
+ eval 'USER="$value"'
++ USER=jharg
+ shift
+ '[' 1 -gt 0 ']'
+ variable=
+ variable=JOB
+ '[' JOB ']'
+ value=mortgage-protection.pdf
+ '[' '!' mortgage-protection.pdf ']'
+ eval 'JOB="$value"'
++ JOB=mortgage-protection.pdf
+ shift
+ '[' 0 -gt 0 ']'
+ unset variable value
+ echo dummy
+ read -r dummy
+ read_r=-r
++++ dirname /usr/local/etc/apsfilter/basedir/bin/apsfilter
+++ dirname /usr/local/etc/apsfilter/basedir/bin
++ dirname /usr/local/etc/apsfilter/basedir
+ CONF_DIR=/usr/local/etc/apsfilter
+ '[' -d /usr/local/etc/apsfilter/basedir ']'
++ eval echo '~jharg'
+++ echo /home/jharg
+ HOMEDIR=/home/jharg
+ SPOOLDIR=lp
+ '[' lp ']'
++ basename lp
+ QUEUE=lp
+ '[' -f /usr/local/etc/apsfilter/apsfilterrc ']'
+ . /usr/local/etc/apsfilter/apsfilterrc
++ PATH=/opt/bin:/usr/openwin/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin
+ '[' -f /usr/local/etc/apsfilter/lp/apsfilterrc ']'
+ . /usr/local/etc/apsfilter/lp/apsfilterrc
++ PRINTER=PS
++ PAPERSIZE=a4
++ METHOD=auto
++ QUALITY=medium
++ COLOR=full
++ RESOLUTION=300x300
+ '[' -f /usr/local/etc/apsfilter/lp/apsfilterrc.jharg ']'
+ '[' dummy ']'
+ USE_USER_CODE=set
+ '[' -n set -a -f /home/jharg/.apsfilter/apsfilterrc.lp ']'
+ export PATH
+ : /tmp
+ APS_TMPDIR=/tmp/apsfilter13368
+ rm -rf /tmp/apsfilter13368
+ mkdir -m 711 /tmp/apsfilter13368
+ '[' 0 -ne 0 ']'
+ export TEMP=/tmp/apsfilter13368 TMPDIR=/tmp/apsfilter13368
+ TEMP=/tmp/apsfilter13368
+ TMPDIR=/tmp/apsfilter13368
+ : /bin/gawk
+ : medium bi plain full
+ '[' '' ']'
+ '[' '!' dummy ']'
+ '[' mortgage-protection.pdf = stdin -o mortgage-protection.pdf = '(stdin)' -o mortgage-protecti
+ '[' '' ']'
+ : 10
+ '[' '' ']'
+ COPIES=1
+ '[' 1 -gt 10 ']'
+ '[' 1 = 0 ']'
+ '[' '' ']'
+ LANDSCAPE=
+ PORTRAIT=set
+ '[' '' = short ']'
+ BINDING=long
+ '[' '' ']'
+ :
+ unset PS_NUP
+ '[' -e /usr/local/etc/apsfilter/restrictions ']'
+ '[' -e /usr/local/etc/apsfilter/lp/restrictions ']'
+ WIDTH_POINTS=595
+ HEIGHT_POINTS=842
+ WIDTH_INCHES=8.26
+ HEIGHT_INCHES=11.69
+ '[' set ']'
+ '[' -f /usr/local/etc/apsfilter/lp/netware.conf -o -f /usr/local/etc/apsfilter/lp/lpr.conf ']'
+ unset REMOTE_COPIES
+ DRIVER_SCRIPT=PS
+ '[' '!' -e /usr/local/etc/apsfilter/basedir/driver/PS ']'
+ '[' -z PS ']'
+ '[' -e /usr/local/etc/apsfilter/basedir/driver/PS ']'
+ . /usr/local/etc/apsfilter/basedir/driver/PS
+ '[' PS '!=' PS ']'
+ unpack print_auto
+ local HEADER FILE_TYPE unpacker unpacker_opts
+ DEPTH=1
+ HEADER=/tmp/apsfilter13368/header1
+ dd bs=1k count=16
++ file /tmp/apsfilter13368/header1
+ FILE_TYPE=/tmp/apsfilter13368/header1: PDF document, version 1.2
++ echo PDF document, version 1.2
++ tr A-Z a-z
+ FILE_TYPE=pdf document, version 1.2
+ unpacker=
+ '[' '' ']'
+ cat /tmp/apsfilter13368/header1 -
+ eval print_auto
++ print_auto
++ print_pdf
++ local paper
++ ACROREAD_OPTS=-toPostScript -size 595x842            -level2 -fast
++ cat
++ find_filter acroread4
++ type acroread4
++ find_filter acroread
++ type acroread
++ find_filter pdftops
++ type pdftops
++ find_filter pdf2ps
++ type pdf2ps
++ '[' a4 = tabloid ']'
++ paper=a4
++ pdf2ps -sPAPERSIZE=a4 /tmp/apsfilter13368/pdf -
++ print_ps
++ local paper gs_cmd
++ '[' '' ']'
++ '[' PS = PS ']'
++ ps_postprocessing
++ '[' '' ']'
++ eval ps_set_duplex
+++ ps_set_duplex
+++ local tumble duplex
+++ '[' long = short ']'
+++ tumble=false
+++ '[' '' ']'
+++ duplex=false
+++ /bin/gawk '{ print } /^%%EndProlog/ { print "countdictstack\n/psset_mark\n{\n%%BeginFeature:
++ print_data
++ local c ncp_print
++ '[' '' ']'
++ '[' 1 = 1 -o -n '' ']'
++ print_copy
++ '[' dummy ']'
++ cat
++ return
++ rm -f /tmp/apsfilter13368/pdf
+ rm -f /tmp/apsfilter13368/header1
+ rm -rf /tmp/apsfilter13368
+ exit
>apsfilterrc changes:
Did not change any. The following are the settings written automatically to
the /usr/local/etc/apsfilter/apsfilterrc program after running setup
 
PRINTER='PS'
PAPERSIZE='a4'
METHOD='auto'
QUALITY='medium'
COLOR='full'
RESOLUTION='300x300'
>Error mails: NONE
>Expected: PDF document to be sent to printer and printed!
Am getting error log files instead.
>Fix: Please help with this!
 
>Comment:
 
I am having problems printing via Samba using lpr to a HP4050PS Postscript printer.
I have followed all instructions, run the setup script and have printed a test page
satisfactorily. Whenever I print using the lpr command, however, I get a log file containing the
following message (under var/spool/lpd/lp):
 
apsfilter warning: unknown option 'dbserver.pfsuk.co.uk'
gawk: cmd. line:1: (FILENAME=- FNR=138) fatal: print to "standard output" failed (Broken pipe)
 
Unexpected interpreter error -16.
Error object:
 

dbserver.pfuk.co.uk is the server name. I have seen reference to this problem occuring elsewhere
in the archive mailings when using samba but not a solution to my specific problem.
 
I have seen the comment in apsfilterrc which indicates that if problems occur people should use the
version of gawk under /opt. I am wondering whether I should try this.
 
I have changed all the security settings for the lpd files to those recommended, i.e. gid set to
lp and believe there are no problems with lpd itself.
 
I have installed the acrobat reader, acroread, under /usr/local/Acrobat4/bin, the default.
 
I am using RedHat 7.2 with Samba 2.2.1a-4, lpr 0.50-4, i.e. all the latest versions.
I am using the apsfilter 7.2.1. Ghostscript was installed with the Linux installation.
 
My /etc/printcap file is as follows:
lp|PS;r=300x300;q=medium;c=full;p=a4;m=auto:\
    :lp=/dev/null:\
    :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=/var/spool/lpd/lp:\
    :lf=/var/spool/lpd/lp/log:\
    :af=/var/spool/lpd/lp/acct:\
    :mx#0:\
    :sh:
 
I would appreciate any help you may be able to give. It seems like gawk may be a potential proble
m? If you believe this to be so then please could you tell me which version to install along with
any necessary options?

Thanks!
 
Jon Hargreaves.