García-Reyes, Enrique on Tue, 7 Aug 2001 19:03:08 +0200 (CEST)


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

[apsfilter-help]



Hi all;

I have a strange problem with apsfilter, i am printing from a computer
with FreeBSD-4.3 using apsfilter 6.1.1, ghostscript 6.5, and a HP 2100
laserjet printer (so i use laserjet as de gs device).

So, the problem is:
I run SETUP to configure and print the test page, Great!!
then i have printed a raw test, Good!!!
If i print an image (say the well known tiger.ps) it works really good
but, when i try to print a text page in postscript it doesn't makes the
job. What i got is that all the lines are printed one after the other,
no separation at all, so one text page shrinks to some 6 cm.
I have tried all kind of modifications to the configurations without 
success. Even more strange (or not??), i have printed using gs in the
command line (with exactly the same options that appear in the debug log
file), both piping the output to /dev/lpt0 and storing in a temp file and
then cat temp > /dev/lpt0 and it works fine.

So i can not figure out what is wrong with apsfilter.
I am sending in the attachment the configuration file, and two log files,
one with the ps_print line at the end of apsfilter commented out, and the
other without this modification.

Please, if you can see what the mistake is tell me in order to kill me
myself.

Best regards.
    Enrique.

       <<<<---->>>><<<<-------------------------------->>>>
       ^^ ENRIQUE ^^      engarcia@fis.cinvestav.mx      ^^
       || GARCÍA  ||  Physics Department, CINVESTAV-IPN  ||
       vv  REYES  vv              Mexico, D.F            vv
       <<<<---->>>><<<<-------------------------------->>>>

##############################################################################
# $ApsCVS: src/apsfilter/template/apsfilterrc,v 1.34.2.1 2001/03/16 07:44:19 andreas Exp $
#
# Sample apsfilter template file for apsfilter 6.0
#
# This file is for customizing apsfilter's behaviour
# Enables you to configures some aspects of apsfilter to fit your own needs.
#
#
# Possible locations for configuration files:
#
# a) global configuration for all printers: $CONF_DIR/apsfilterrc
# b) printer specific: $CONF_DIR/$QUEUE/apsfilterrc
# c) printer specific, supplied by user: $CONF_DIR/$QUEUE/apsfilterrc.$USER
# d) printer specific, controlled by user: ~$USER/.apsfilter/apsfilterrc.$QUEUE
#    (admin must set USE_USER_CODE for this to be used)
##############################################################################

#=============================================================================
# apsfilter specific configuration
#=============================================================================

# include special paths you need
# default: PATH="/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin"
#PATH="/opt/bin:/usr/openwin/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin"
PATH="/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin"
# who is to be notified in case of a failure
# default: NOTIFY=root
#NOTIFY=lp

# directory for temporary file creation
# default: TMPDIR=/tmp
TMPDIR="/opt/tmp"

###
### WARNING !
###
### This setting allows users to provide configuration in a shell script;
### do _not_ set this if the input filter runs under a privileged user.
###
### To be on the safe side, you can also create user-specific config files
###	$CONF_DIR/$QUEUE/apsfilterrc.$USER
### which contain settings that have been inspected by the administrator.
###
# default: USE_USER_CODE=""
#USE_USER_CODE=set


#=============================================================================
# printer independent configuration
#=============================================================================

# search path for embedded images used by dvips; this path will be extended
# by "$HOME:/tmp:/var/tmp" (where $HOME is the home directory of the user)
# default: TEXINPUTS=""
#TEXINPUTS=/usr/accounts/andreas/pictures:/usr/share/dvips/pictures

# custom DVI-to-PrinterLanguage filter (stdin->stdout)
# default: PRINT_DVI="" -> will use dvips
#PRINT_DVI='/usr/local/bin/my_super_filter -X -Y -Z -'

# set this of your MakeTeXPK tool works correctly
# default: HAVE_MAKETEXPK=""
#HAVE_MAKETEXPK=set

# dvips option for setting the resolution
# default: DVIPS_RES_DorP=-D
#DVIPS_RES_DorP=-P

# ghostscript environment variables
# defaults:
#  GS_FONTPATH="/usr/X11R6/lib/X11/fonts/Type1:/var/X11R6/lib/X11/fonts/Type1"
#  GS_LIB="$GS_FONTPATH"
GS_FONTPATH="/usr/X11R6/lib/X11/fonts/Type1:/usr/local/share/ghostscript/fonts"
GS_LIB=/usr/local/share/ghostscript/6.50/lib


#============================================================================
# printer dependent configuration
#============================================================================

# escape sequences to be sent before/after a "raw" print job
# defaults:
#  RAW_PROLOGUE=""
#  RAW_EPILOGUE=""
#RAW_PROLOGUE='\033&k2G\033(s2Q\033&k5W\033&l0L\033&a7L\033(s12H'
#RAW_EPILOGUE='\014'

# ghostscript options; can be altered by class options
# defaults:
#  GS_FEATURES=""
#  GS_RESOL=<printer dependent; 300x300, 360x360 or 600x600>
#GS_FEATURES='-dBitsPerPixel=32 -dMicroweave -sDithering=fscmyk'
#GS_RESOL=600x600

# printer initialisation (used by gs)
# default: PS_INIT=""
#PS_INIT=stcolor.ps
PS_INIT=""

# printer cleanup (used by gs)
# default: PS_EXIT=""
#PS_EXIT=/my_files/postscript/page_eject.ps

# options for pnm2ppa; these override the values given in the config files
# /etc/pnm2ppa.conf  and  $CONF_DIR/$QUEUE/pnm2ppa.conf
# default: PPA_OPTS=""
#> class options: uni, bi, eco, noblack
#PPA_OPTS='--bi --eco'

# set COLOR=mono for a grayscale printer
# default: COLOR=color
#> class options: color, colour, mono
COLOR=mono

# printer is a duplex capable printer
# default: HARDWARE_DUPLEX=""
HARDWARE_DUPLEX=""

# disable duplex printing; only needed if HARDWARE_DUPLEX is empty _and_ if
# apsfilter doesn't run on the local host
# default: DISABLE_DUPLEX=""
DISABLE_DUPLEX=set

# papertray selection
# default: PAPERTRAY=""
#> class options: tray0, ..., tray9
#PAPERTRAY=1

# maximum number of copies printed via "lpr -C copies=42" or "lpr -Z copies=42";
# this is independent of the "-#" and "-K" switches to lpr
# default: MAXCOPIES=10
MAXCOPIES=10



#============================================================================
# visual appearance of the printout
#============================================================================

# filter for ASCII files; one of a2ps, mpage, enscript, recode
# default: ASCII_FILTER=a2ps
#> class options: a2ps, mpage, enscript, recode
ASCII_FILTER=a2ps

# override a2ps default options
# defaults:
#  A2PS_BASIC="-X iso1 -g --prologue=color" or
#	      "-X iso1 -g --prologue=gray" resp.
#  A2PS_PAPERSIZE="$PAPERSIZE" (case-corrected)
#A2PS_BASIC='-X iso1'
#don't format troff documents, by Joerg Wunsch <joerg@apsfilter.org>
#A2PS_BASIC='-Eplain'
A2PS_PAPERSIZE=Letter
#A2PS_PAPERSIZE=A4stylus

# override the complete a2ps commandline
#A2PS_OPTS='-X iso1 -m --borders=yes --prologue=color --highlight-level=heavy'

# override mpage default options
# defaults:
#  MPAGE_BASIC="-CISO-Latin.1 -f"
#  MPAGE_PAPERSIZE="$PAPERSIZE" (case-corrected)
#MPAGE_BASIC='-CISO-Latin.2 -f'
#MPAGE_PAPERSIZE=Letter
#MPAGE_PAPERSIZE=A4

# override the complete mpage commandline
#MPAGE_OPTS='-CISO-Latin.2 -a -e -r'

# override enscript default options
# defaults:
#  ENSCRIPT_BASIC="-X 88591 --color" or "-X 88591 --color=blackwhite" resp.
#  ENSCRIPT_PAPERSIZE="$PAPERSIZE" (case-corrected)
#ENSCRIPT_BASIC='-C 88592'
#ENSCRIPT_PAPERSIZE=Letter
#ENSCRIPT_PAPERSIZE=A4

# override the complete enscript commandline
#ENSCRIPT_OPTS='-X 88592 -r --ps-level=1'

# print headers and borders for ASCII files
# defaults:
#  ASCII_HEADER=""
#  ASCII_BORDER=""
#> class options: header, noheader, border, noborder
#ASCII_HEADER=set
#ASCII_BORDER=set

# multiple pages per sheet (can be 1,2,4,8)
# default: PS_NUP=1
#> class options: 1pps, 2pps, 4pps, 8pps
PS_NUP=1
# same setting, but for ASCII files only
# default: ASCII_PPS="$PS_NUP"
ASCII_PPS=1

# force paper orientation
# default: LANDSCAPE=""
#> class options: landscape, portrait
#LANDSCAPE=set
# same setting, but for ASCII files only
# default: ASCII_LANDSCAPE="$LANDSCAPE"
#ASCII_LANDSCAPE=set

# override html2ps options
# default: HTML2PS_OPTS="-e ISO-8859-1 -u -H"
#HTML2PS_OPTS='-e ISO-8859-2 -u -H'

# override recode options
# default: RECODE_OPTS="latin1..ibmpc"
#RECODE_OPTS='latin1..cp437'

# use pstools to alter the PostScript printout
# defaults:
#  PS_BOOK=""
#  PS_UTILS=""
#> class options: book
#PS_BOOK=set
#PS_UTILS='psselect -r'

# duplex printing (will be "faked" if printer can't handle this by itself)
# default: DUPLEX=""
#> class options: duplex, simplex
DUPLEX=""

# binding edge; must be long or short
# default: BINDING=long
#> class options: shortbind, longbind
BINDING=long
+ PATH=/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin
+ VERSION=6.1.1
+ umask 077
+ trap  1 13
+ trap rm -rf "$APS_TMPDIR"; exit $return_code; 0
+ trap exit 9 1 5 7 10 12 15
+ [ 8 -gt 0 ]
+ variable=
+ variable=variable
+ [ variable ]
+ value=132
+ [ ! 132 ]
+ eval variable="$value"
+ variable=132
+ shift
+ [ 7 -gt 0 ]
+ variable=
+ variable=variable
+ [ variable ]
+ value=66
+ [ ! 66 ]
+ eval variable="$value"
+ variable=66
+ shift
+ [ 6 -gt 0 ]
+ variable=
+ variable=variable
+ [ variable ]
+ value=0
+ [ ! 0 ]
+ eval variable="$value"
+ variable=0
+ shift
+ [ 5 -gt 0 ]
+ variable=
+ variable=USER
+ [ USER ]
+ value=
+ [ !  ]
+ shift
+ value=root
+ eval USER="$value"
+ USER=root
+ shift
+ [ 3 -gt 0 ]
+ variable=
+ variable=HOST
+ [ HOST ]
+ value=
+ [ !  ]
+ shift
+ value=casa.casa.casa
+ eval HOST="$value"
+ HOST=casa.casa.casa
+ shift
+ [ 1 -gt 0 ]
+ variable=
+ ACCT_FILE=/var/spool/lpd/lp/acct
+ [  ]
+ 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 ~root
+ echo /root
+ HOMEDIR=/root
+ SPOOLDIR=/var/spool/lpd/lp
+ [ /var/spool/lpd/lp ]
+ basename /var/spool/lpd/lp
+ QUEUE=lp
+ [ -f /usr/local/etc/apsfilter/apsfilterrc ]
+ . /usr/local/etc/apsfilter/apsfilterrc
+ PATH=/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin
+ TMPDIR=/opt/tmp
+ GS_FONTPATH=/usr/X11R6/lib/X11/fonts/Type1:/usr/local/share/ghostscript/fonts
+ GS_LIB=/usr/local/share/ghostscript/6.50/lib
+ GS_RESOL=600x600
+ COLOR=mono
+ HARDWARE_DUPLEX=
+ DISABLE_DUPLEX=set
+ MAXCOPIES=10
+ ASCII_FILTER=a2ps
+ A2PS_PAPERSIZE=Letter
+ PS_NUP=1
+ ASCII_PPS=1
+ DUPLEX=
+ BINDING=long
+ [ -f /usr/local/etc/apsfilter/lp/apsfilterrc ]
+ . /usr/local/etc/apsfilter/lp/apsfilterrc
+ PRINTER=laserjet
+ PAPERSIZE=letter
+ METHOD=auto
+ RESOLUTION=600x600
+ GS_RESOL=600x600
+ [ -f /usr/local/etc/apsfilter/lp/apsfilterrc.root ]
+ [ -n  -a -f /root/.apsfilter/apsfilterrc.lp ]
+ export PATH
+ : /opt/tmp
+ APS_TMPDIR=/opt/tmp/apsfilter455
+ rm -rf /opt/tmp/apsfilter455
+ mkdir -m 711 /opt/tmp/apsfilter455
+ [ 0 -ne 0 ]
+ export TEMP=/opt/tmp/apsfilter455 TMPDIR=/opt/tmp/apsfilter455
+ [ 600x600 = default ]
+ [ !  ]
+ read pid
+ read -r control_file
+ read -r line
+ value=casa.casa.casa
+ HOST=casa.casa.casa
+ read -r line
+ value=root
+ USER=root
+ read -r line
+ value=casa.casa.casa
+ CLASS=casa.casa.casa
+ read -r line
+ value=226308 158727
+ read -r line
+ value=dfA006casa.casa.casa
+ read -r line
+ value=dfA006casa.casa.casa
+ read -r line
+ value=masses1.ps
+ FNAME=masses1.ps
+ read -r line
+ [ x = x ]
+ JOB=masses1.ps
+ unset pid control_file line value
+ [ masses1.ps = stdin -o masses1.ps = (stdin) -o masses1.ps = (STDIN) ]
+ find_filter gs
+ type gs
+ gs --version
+ GS_VERSION=6.50
+ [ casa.casa.casa ]
+ old_ifs= 	

+ IFS=:,
+ echo casa.casa.casa,
+ tr A-Z a-z
+ set -- casa.casa.casa 
+ IFS= 	

+ unset old_ifs
+ unset option
+ : 10
+ [  ]
+ COPIES=1
+ [ 1 -gt 10 ]
+ [ 1 = 0 ]
+ [ mono = mono ]
+ COLOR= MONO=set
+ [  ]
+ LANDSCAPE= PORTRAIT=set
+ [ long = short ]
+ BINDING=long
+ [ set ]
+ unset DUPLEX
+ : 1
+ unset PS_NUP
+ WIDTH_POINTS=612
+ HEIGHT_POINTS=792
+ WIDTH_INCHES=8.5
+ HEIGHT_INCHES=11
+ trap : 0
+ unpack print_auto
+ local HEADER FILE_TYPE unpacker
+ DEPTH=1
+ HEADER=/opt/tmp/apsfilter455/header1
+ dd bs=1k count=16
+ file /opt/tmp/apsfilter455/header1
+ FILE_TYPE=/opt/tmp/apsfilter455/header1: PostScript document text conforming at level 2.0
+ tr A-Z a-z
+ echo PostScript document text conforming at level 2.0
+ FILE_TYPE=postscript document text conforming at level 2.0
+ unpacker=
+ [  ]
+ cat /opt/tmp/apsfilter455/header1 -
+ eval print_auto
+ print_auto
+ print_ps
+ local input
+ [  ]
+ find_filter gs
+ type gs
+ : /usr/X11R6/lib/X11/fonts/Type1:/usr/local/share/ghostscript/fonts
+ : /usr/local/share/ghostscript/6.50/lib
+ export GS_FONTPATH GS_LIB
+ input=-_
+ ps_postprocessing
+ [  ]
+ eval cat
+ cat
+ eval gs -q -dNOPAUSE -dSAFER -sDEVICE=laserjet -r600x600 -sPAPERSIZE=letter -sOutputFile=- -_
+ gs -q -dNOPAUSE -dSAFER -sDEVICE=laserjet -r600x600 -sPAPERSIZE=letter -sOutputFile=- -_
+ print_data
+ cat
+ rm -f /opt/tmp/apsfilter455/header1
+ :
+ PATH=/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin
+ VERSION=6.1.1
+ umask 077
+ trap  1 13
+ trap rm -rf "$APS_TMPDIR"; exit $return_code; 0
+ trap exit 9 1 5 7 10 12 15
+ [ 8 -gt 0 ]
+ variable=
+ variable=variable
+ [ variable ]
+ value=132
+ [ ! 132 ]
+ eval variable="$value"
+ variable=132
+ shift
+ [ 7 -gt 0 ]
+ variable=
+ variable=variable
+ [ variable ]
+ value=66
+ [ ! 66 ]
+ eval variable="$value"
+ variable=66
+ shift
+ [ 6 -gt 0 ]
+ variable=
+ variable=variable
+ [ variable ]
+ value=0
+ [ ! 0 ]
+ eval variable="$value"
+ variable=0
+ shift
+ [ 5 -gt 0 ]
+ variable=
+ variable=USER
+ [ USER ]
+ value=
+ [ !  ]
+ shift
+ value=root
+ eval USER="$value"
+ USER=root
+ shift
+ [ 3 -gt 0 ]
+ variable=
+ variable=HOST
+ [ HOST ]
+ value=
+ [ !  ]
+ shift
+ value=casa.casa.casa
+ eval HOST="$value"
+ HOST=casa.casa.casa
+ shift
+ [ 1 -gt 0 ]
+ variable=
+ ACCT_FILE=/var/spool/lpd/lp/acct
+ [  ]
+ 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 ~root
+ echo /root
+ HOMEDIR=/root
+ SPOOLDIR=/var/spool/lpd/lp
+ [ /var/spool/lpd/lp ]
+ basename /var/spool/lpd/lp
+ QUEUE=lp
+ [ -f /usr/local/etc/apsfilter/apsfilterrc ]
+ . /usr/local/etc/apsfilter/apsfilterrc
+ PATH=/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin
+ TMPDIR=/opt/tmp
+ GS_FONTPATH=/usr/X11R6/lib/X11/fonts/Type1:/usr/local/share/ghostscript/fonts
+ GS_LIB=/usr/local/share/ghostscript/6.50/lib
+ GS_RESOL=600x600
+ COLOR=mono
+ HARDWARE_DUPLEX=
+ DISABLE_DUPLEX=set
+ MAXCOPIES=10
+ ASCII_FILTER=a2ps
+ A2PS_PAPERSIZE=Letter
+ PS_NUP=1
+ ASCII_PPS=1
+ DUPLEX=
+ BINDING=long
+ [ -f /usr/local/etc/apsfilter/lp/apsfilterrc ]
+ . /usr/local/etc/apsfilter/lp/apsfilterrc
+ PRINTER=laserjet
+ PAPERSIZE=letter
+ METHOD=auto
+ RESOLUTION=600x600
+ GS_RESOL=600x600
+ [ -f /usr/local/etc/apsfilter/lp/apsfilterrc.root ]
+ [ -n  -a -f /root/.apsfilter/apsfilterrc.lp ]
+ export PATH
+ : /opt/tmp
+ APS_TMPDIR=/opt/tmp/apsfilter10651
+ rm -rf /opt/tmp/apsfilter10651
+ mkdir -m 711 /opt/tmp/apsfilter10651
+ [ 0 -ne 0 ]
+ export TEMP=/opt/tmp/apsfilter10651 TMPDIR=/opt/tmp/apsfilter10651
+ [ 600x600 = default ]
+ [ !  ]
+ read pid
+ read -r control_file
+ read -r line
+ value=casa.casa.casa
+ HOST=casa.casa.casa
+ read -r line
+ value=root
+ USER=root
+ read -r line
+ value=casa.casa.casa
+ CLASS=casa.casa.casa
+ read -r line
+ value=226308 158727
+ read -r line
+ value=dfA005casa.casa.casa
+ read -r line
+ value=dfA005casa.casa.casa
+ read -r line
+ value=masses1.ps
+ FNAME=masses1.ps
+ read -r line
+ [ x = x ]
+ JOB=masses1.ps
+ unset pid control_file line value
+ [ masses1.ps = stdin -o masses1.ps = (stdin) -o masses1.ps = (STDIN) ]
+ find_filter gs
+ type gs
+ gs --version
+ GS_VERSION=6.50
+ [ casa.casa.casa ]
+ old_ifs= 	

+ IFS=:,
+ echo casa.casa.casa,
+ tr A-Z a-z
+ set -- casa.casa.casa 
+ IFS= 	

+ unset old_ifs
+ unset option
+ : 10
+ [  ]
+ COPIES=1
+ [ 1 -gt 10 ]
+ [ 1 = 0 ]
+ [ mono = mono ]
+ COLOR= MONO=set
+ [  ]
+ LANDSCAPE= PORTRAIT=set
+ [ long = short ]
+ BINDING=long
+ [ set ]
+ unset DUPLEX
+ : 1
+ unset PS_NUP
+ WIDTH_POINTS=612
+ HEIGHT_POINTS=792
+ WIDTH_INCHES=8.5
+ HEIGHT_INCHES=11
+ trap : 0
+ unpack print_auto
+ local HEADER FILE_TYPE unpacker
+ DEPTH=1
+ HEADER=/opt/tmp/apsfilter10651/header1
+ dd bs=1k count=16
+ file /opt/tmp/apsfilter10651/header1
+ FILE_TYPE=/opt/tmp/apsfilter10651/header1: PostScript document text conforming at level 2.0
+ echo PostScript document text conforming at level 2.0
+ tr A-Z a-z
+ FILE_TYPE=postscript document text conforming at level 2.0
+ unpacker=
+ [  ]
+ cat /opt/tmp/apsfilter10651/header1 -
+ eval print_auto
+ print_auto
+ print_ps
+ ps_postprocessing
+ [  ]
+ print_data
+ cat
+ eval cat
+ cat
+ rm -f /opt/tmp/apsfilter10651/header1
+ :