XFAXand Ghostscript (sending PDF and Postscript)
XFAX- User’s Guide 4.3a 31
10. XFAX and Ghostscript (sending PDF andPostscript)
Using XFAXwith 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 instructionsof how to add a XFAX driver to Ghostscript 7.00,
which today(june 2001) is the latest version of Ghostscript. The procedure does
requireknowledge 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. Downloadthe Ghostscript distribution. You find informationon where it is
availableat www.ghostscript.com. Extract it to, for example, /opt/gs7.00 (we use
this pathfrom now on), and followthe installation instructions to compile it on
your platform.We do not provide support for the Ghostscript software itself.
2. Download andstore 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/ghost-
script.
3. When you compileGhostscript you use one of the supplied makefiles, we use
src/unixansi.mak.You need to modify the makefile to include theXFAX driver.
Add$(DD)xfaxhigh.dev to the DEVICE_DEVS7 line in the makefile. In our dis-
tributionwe changed line 339 in unixansi.mak:
DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev
$(DD)xfaxhigh.dev
Youalso need to add the device to devs.mak. We added the following five lines
to devs.makat line 1259:
xfax_=$(GLOBJ)gdevxfax.$(OBJ)
$(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 fiveabove the leading whitespace must be a tab.
Now you shouldbe able to compile gs with support for the XFAX driver.
4. Usingthe new gs executable, try to convert one of the sample Postscript files
using thexfaxhigh driver. For example:
# cd /opt/gs7.00/lib
# ../bin/gs -dNOPAUSE -sDEVICE=xfaxhigh -sOutputFile=test.fax ../
examples/golfer.ps