Faxing From a Web Page
Part of my job at the publishing company where I work is finding new ways to finish time-consuming jobs more quickly. After implementing an on-line order entry system and a Mac file server, I set up an e-mail/dial-up router for a remote office. The staff did a lot of faxing which consumed a huge amount of time that could have been better spent doing other tasks. The small 486 we used didn't have enough horsepower to handle fax conversion, so I didn't try to use it for that job. After the power supply fan quit and the machine died, I decided to get a more powerful machine and set up a fax server.
We ordered a 133 MHz Pentium 5 for the new server. It has an Ethernet card and two modems to eliminate fighting for the telephone line. One modem is used for the PPP dial-up, and one is a Class 2.0 fax-modem. Most fax-modems implement only Class 1 fax transmissions, which require the computer to do most of the processing, but Class 2.0 frees up those resources.
I had used the HylaFAX software a few years before and knew it could easily handle the volume of faxes that we send. More importantly, it was within my budget. By using Linux and other free software, I had the money for hardware and another phone line—money that would have otherwise been spent on expensive software.
HylaFAX uses Ghostscript to convert faxes from PostScript to the tagged image file format (tiff), as faxes are sent over the line in a form of tiff. One of the most important things to do is make sure that the Ghostscript software is set up correctly and has the tiffg3 driver enabled. Without this driver, you will spend a long time wondering why you can't finish the HylaFAX setup.
Originally, I just wanted to be able to fax a certain set of documents. Part of the way through the setup process, I found a Macintosh extension called MacFlex that allows a Mac to print to the fax server as if it were a printer. After you choose print, MacFlex asks for the phone number and spools the document to the server. It is well-written software that has produced more “oohs” and “ahhs” in the office than the server, and it is available from http://www.eats.com/.
In order for the users to send documents to the fax server from their own Macintoshes, Netatalk was installed. Netatalk lets you share Linux drivers with Macintosh machines. These drivers show up in the Chooser like any other server.
After installing and testing Ghostscript and finding the location of the executables and fonts, it's time to get HylaFAX. Download information and documentation is at http://www.vix.com/hylafax/. Most of the configuration consists of setting paths to reflect the directory structure of your system. After the software is installed, another round of configuration is done to set up the modems. First, the program faxaddmodem probes the modems to determine the manufacturer, speed, class and other information. Then, in a send-only environment, the program faxmodem is run to tell the daemon that a new modem exists. I could never get the faxmodem program to work correctly, so I ran the program faxgetty on the correct serial port. faxgetty is a specialized version of getty that reports status information on the modem to the fax daemon.
The program included with HylaFAX to queue outgoing faxes uses a command-line interface. Since the users of the system were accustomed to Macintoshes, I didn't think they should have to learn Unix just for the purpose of sending their faxes. Therefore, I wrote a Web front-end to HylaFAX that allows them to select one or more documents from a list and choose to send it to a distribution list or to an individual.
After getting HylaFAX completely installed and running, I thought the worst was over. However, HylaFAX comes with a default cover page that includes the Silicon Graphics logo, and we already had a nice cover page I wished to continue using. I know a small amount of PostScript, but 1 megabyte of machine-generated PostScript is nearly impossible for me to decode. After trying unsuccessfully for half a day to change the default to match our cover page, I looked through the information on the HylaFAX web site mentioned above and found more helpful instructions on constructing the cover page. I removed a graphic from the default cover page that cut the size of the PostScript file from 1MB to about 100K. This version was much easier to modify, and I had it going in about an hour. The cover page on the web site is a template that the program faxcover fills in. In order to put in the place holders that faxcover needs, you must open the PostScript version of the cover page in a text editor and insert the correct fields. Checking the cover page for appearance is difficult, since the blanks show up empty in a PostScript viewer unless you first run faxcover and put in some test data. Doing this just makes a version of your cover page for you to look at—it does not send any faxes.
Overall, the project was a success. After a few minor problems, the system is chugging away handling IP masquerading, UUCP over TCP and out-bound faxing. The total hardware cost was under $2000US. I spent nearly 60 hours writing the front-end software(1) and making sure all the other pieces worked together correctly. The time required to send a fax dropped from 10 to 15 minutes to about 30 seconds.
Practical books for the most technical people on the planet. Newly available books include:
- Agile Product Development by Ted Schmidt
- Improve Business Processes with an Enterprise Job Scheduler by Mike Diehl
- Finding Your Way: Mapping Your Network to Improve Manageability by Bill Childers
- DIY Commerce Site by Reven Lerner
Plus many more.