XFAX 4.3a - User's Guide

Table of ContentsPreviousNextIndex

10. XFAX and Ghostscript (sending PDF and Postscript)

Using XFAX with the software Ghostscript makes it possible to fax Postscript and PDF documents. Ghostscript is available more or less freely as long as you comply with the terms in the licence under which it is distributed. You can learn more at www.ghostscript.com.

Below you find instructions of how to add a XFAX driver to Ghostscript 7.00, which today (june 2001) is the latest version of Ghostscript. The procedure does require knowledge on how to configure and compile a C source code distribution in a UNIX environment. You MUST have a C compiler installed on your UNIX box.

10.1 Installing Ghostscript and the XFAX driver

1. Download the Ghostscript distribution. You find information on where it is available at www.ghostscript.com. Extract it to, for example, /opt/gs7.00 (we use this path from now on), and follow the installation instructions to compile it on your platform. We do not provide support for the Ghostscript software itself.

2. Download and store the XFAX source files, gdevxfax.c and gdevxfax.h, into /opt/gs7.00/src. You can get the files from ftp://ftp.infoflex.se/pub/xfax/ghostscript.

3. When you compile Ghostscript you use one of the supplied makefiles, we use src/unixansi.mak. You need to modify the makefile to include the XFAX driver. Add $(DD)xfaxhigh.dev to the DEVICE_DEVS7 line in the makefile. In our distribution we changed line 339 in unixansi.mak:

DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev $(DD)xfaxhigh.dev 

You also need to add the device to devs.mak. We added the following five lines to devs.mak at line 1259:

$(DD)xfaxhigh.dev : $(DEVS_MAK) $(xfax_) $(GLD)page.dev
$(SETPDEV2) $(DD)xfaxhigh $(xfax_)
$(GLOBJ)gdevxfax.$(OBJ) : $(GLSRC)gdevxfax.c $(PDEVH)
$(GLCC) $(GLO_)gdevxfax.$(OBJ) $(C_) $(GLSRC)gdevxfax.c

On line three and five above the leading whitespace must be a tab.
Now you should be able to compile gs with support for the XFAX driver.

4. Using the new gs executable, try to convert one of the sample Postscript files using the xfaxhigh driver. For example:

# cd /opt/gs7.00/lib
# ../bin/gs -dNOPAUSE -sDEVICE=xfaxhigh -sOutputFile=test.fax ../examples/golfer.ps

5. I the above works out OK, you should now be able to fax Postscript and PDF files. If you are using XFAX 4.2a or later faxsend directly supports files with .ps and .pdf suffix respectively. Please note that faxsend requires the Ghostscript executable, gs, to be in the PATH and properly configured.

# faxsend 12345 test.pdf

If you are using an earlier version you need to do the conversion separately.

# gs -dBATCH -dNOPAUSE -sDEVICE=xfaxhigh -sOutputFile=test.fax test.pdf
# faxsend 12345 test.fax

10.2 Troubleshooting

If you are expebriencing problems there are two common mistakes to be mentioned here:
1) You should run "make -f src/unixansi.mak install" so that the files Ghostscript needs is placed in the proper locations. Among other files gs looks for gs_init.ps in /usr/local/share/ghostscript/7.00/lib.

2) You need the font files which are distributed in separate tar files. gs looks for fonts in /usr/local/share/ghostscript/fonts.

The XFAX driver for Ghostscript is provided "as is" without warranties and we cannot guarantee support. However, we are helpful! Send your questions to support@nordicmessaging.se.

Table of ContentsPreviousNextIndex