#	$Id: TROUBLESHOOTING,v 1.2 1999/02/18 21:15:15 andreas Exp $

[ Note: APS_BASEDIR is the directory where apsfilter was installed
	typically: /usr/local/lib/apsfilter ]

1.1	Make sure, that the programs a2ps in APS_BASEDIR is the binary,
	that has been compiled and installed during the installation 
	process (SETUP script).
	Why ? 
	a) It happened, that I created an apsfilter release with
	   FreeBSD binaries that caused problems on a Linux 
	   system ;-)
	b) the automatically compilation of a2ps might fail during setup.

1.1.1	How to compile and install a2ps manually ?

	cd APS_BASEDIR/src/a2ps-4.2-akl-new
	make clean
	make
		if the C-Compiler reports problems here, then you have
		to change things either in a2ps's C-Source (an include
		file might be wrong or missing) or you have to fiddle
		around in the Makefile (choosing another compiler or
		other/additionally debug/optimization flags)
	make install
	make clean

1.3	Everything seems to be fine (a2ps is correctly
	installed) but the printer doesn't print.

1.3.1	If you have a non Postscript printer attached, do you have
	ghostscript (gs) installed on your system ? This Postscript
	emulator is urgently needed for non PS printer.

1.3.2	Is ghostscript (gs) installed in a directory, that is in
	apsfilter's search path ? Check this in the following file:
		APS_BASEDIR/global/GLOBAL.sh
	If required add one or more directory to the environment
	variable LOCAL_PATHS, i.e.:
		LOCAL_PATHS=/this/directory:/and/this/is/needed/too

1.4	Where to look for further informations ?

1.4.1	Look for error messages or warnings on your systems
	console screen. If you have a system like Linux or
	*BSD with multiple consoles (switchable via ALT F1, ALT F2,...)
	then the console is usually the screen you see after booting
	the system or the one after typing ALT F1 (the two keys pressed
	simultaneously).

1.4.2	Look for messages in system dependend logging files,
	depends on your flavour of Unix System.
	FreeBSD: /var/log/messages, /var/log/lpd-errs
	Most Linux systems: /usr/adm/messages, /var/adm/messages
	Ask you systems manager, if you have further trouble.

1.5	*** Debugging the filter ***, because:
	Everything seems to be ok, I have not all,
	but the most important utilities installed for a2ps
	(gs,a2ps), search paths are correct for
	apsfilter and the Operating System is quiet ....

1.5.1	apsfilter is mainly a shellscript. 
	The script is being executed by the Bourne (or a compatible) shell.
	We can activate the shells logging feature in the apsfilter script 
	by uncommenting the line set -x.
	Go into the directory APS_BASEDIR/bin
	Edit the apsfilter script. Search for the line with the command
	#set -x
	Remove the '#'-sign at the beginning of the line and
	save the apsfilter script and leave the editor.
	
	Now you'll find debugging output in your printers spool
	directory. The spool directory is the directory specified
	by the label sd=/.... in the file /etc/printcap. I.e:

	If your printcap Entry looks like this (removed unnecessary lines):

	ascii|lp1|djet500-a4-ascii-mono|djet500 ascii mono:\
		:lp=/dev/lpt0:\
		:sd=/var/spool/djet500:\
		:lf=/var/spool/djet500/log:\
		:af=/var/spool/djet500/acct:\
		:if=/usr/local/lib/apsfilter/filter/aps-djet500-a4-ascii-mono:\
		:mx#0:\
		:sh:

	Then your spool directory (sd=) is
		/var/spool/djet500

	The logfile (lf=) containing the debugging output is
		/var/spool/djet500/log

	Browse through the logfile after an unsuccesfull print
	attempt and look for errors and warnings

	The lines starting with a '+' sign are the commands/lines in
	the apsfilter script, that actually were executed, immediately
	under that line you find the corresponding result or an error
	message.

	If you are an experienced Unix user, this will help you to
	get an idea what's going wrong.

1.5.2	If you are starting to think, that you spent too much
	paper during debugging, then you can REDIRECT THE PRINTING
	OUTPUT TO A FILE, this saves a lot of paper in certain
	circumstances.
	As in 1.5.1 you have to edit the apsfilter script
	APS_BASEDIR/bin/apsfilter
	and activate the line containing the variable DEBUG_TO_FILE


Still problems ?

Please send me a bug report, read the following document:

	-> HOWTO-BUGREPORTS
