[cups] Sending mail from a CentOS7 virtual machine to Fuji Xerox ApeosPort-IV C4475 problem revisted

マスターズ・イアン ian at ncsa.jp
Wed Oct 10 18:26:58 PDT 2018


Hello

> Welcome back!

Thank you. So happy to be back in CUPS hell.

> You did not say so I will ask: did you compare the Windows printjobs to see what PJL (and possibly other) commands need to be added. And did you then compare to see whether a printjob with those items added by hand if necessary will print? Only when you can make sure of that can the work be automated.

I don't know how to do that and my searches to find out how have been unsuccessful so far. Perhaps I need to wireshark a printjob as Zdenek suggested.

> It could well be that there is a problem in your filter that strips the data out of the job, or it could be that the strings somehow are not correct so that the printer cannot tell the proper size of the job and tells you it is 0 bytes.

I think it is highly likely that I still have config problems.

11F1 is my printer. Do these settings look OK for a CentOS7 system?:

① /etc/cups/ppd/11F1.ppd (lines 32/33):
*cupsFilter:    "application/vnd.cups-pjlprintfx 0 fxauth"
*cupsFilter:    "application/vnd.cups-postscript 0 pstopdffx"

② /etc/cups/ppd/11F1.fx:
FX_MACHINE_NAME="@CNAM=P10316-VM"
FX_AUTH_ID="@DAID="
FX_CARD_NUMBER="@JOAU=1234"
FX_LOCAL_USER="@LUNA=1234"

where 1234 is the username that I have to authenticate with the Xerox printer with. I'm guessing that these are OK, because the printer is not discarding the job.

③ /etc/cups/mimefx.types (lines 71,72):
application/vnd.cups-pdfprintfx
application/vnd.cups-pjlprintfx

④ /etc/cups/mimefx.convs (lines 45,46):
application/pdf application/vnd.cups-pdfprintfx 0       pdftopdffx
application/vnd.cups-pdfprintfx application/vnd.cups-pjlprintfx 0       pdftopjlfx

⑤ Also /usr/lib/cups/filter/fxauth:
#!/bin/bash

[ -n "$6" ] && exec <"$6"
# input is regular file
cleanup() { EXIT_CODE=$? ; rm -f $INPUT &>/dev/null ; exit $EXIT_CODE ; }
trap 'cleanup' 0 1 2 3 15

MY_NAME=${0##*/}
INPUT=$( mktemp /var/spool/cups/tmp/$MY_NAME.XXXXXX ) || exit 1
cat - >$INPUT

# prefilter for all printjobs arriving on linux, since authentication is not optional

source /etc/cups/ppd/${PRINTER}.fx

sed -e '/@PJL COMMENT Version:4.00/ a\
@PJL SET JOBATTR='\"${FX_MACHINE_NAME}\"'\
@PJL SET JOBATTR='\"${FX_AUTH_ID}\"'\
@PJL SET JOBATTR='\"${FX_LOCAL_USER}\"'\
@PJL SET JOBATTR='\"${FX_CARD_NUMBER}\" $INPUT

exit $?

I think that's it.

I'm going to try a wire shark capture on a Windows print job.

ian







More information about the cups mailing list