13. How to print to a fax machine.

You can print to a fax machine with, or without, a modem.

13.1. Using a faxmodem

There are a number of fax programs out there that will let you fax and receive documents. One of the most powerful is Sam Leffler's HylaFAX. It supports all sorts of things from multiple modems to broadcasting.

SuSE ships a Java HylaFax client which allegedly works on any Java platform (including Windows and Linux). There are also non-Java fax clients for most platforms; Linux can almost certainly handle your network faxing needs.

Also available, and a better choice for smaller installations, is efax, a simple program which sends and receives faxes. The getty program mgetty can receive faxes using efax (and do voicemail or interactive logins).

13.1.1. Faxing from PDQ

PDQ doesn't ship with a fax interface declaration, but here's a simple one (which is only partly tested):
interface efax-0.1 {
   help "This interface uses the efax package's fax program to send a
         fax.  You should first get efax's \"fax send\" working by
         itself by editing the file /etc/efax.rc and testing.  Connect
         this interface to a generic postscript driver to define a
         fax machine \"printer\"". 

   requires { "efax" "fax" }

   # Making phone number required means that the add printer wizard
   # will demand a phone number at add printer time.  This is
   # undesirable, so it isn't explicitly required, even though it is
   # logically required.  The send_exec script checks for the number.
   # You could skip the wizard by adding this printer by hand to
   # .printrc, mark this as required, and it might then prompt?
   argument {
      var = "PHONE_NUMBER"
      desc = "Phone Number"
      help = "The phone number to dial.  Prefixes like 9 ought to be
              defined in your /etc/efax.rc file."
   }

   option {
      var = "RESOLUTION"
      desc = "Fax resolution"
      default_choice = "high"
      choice "low" {
         value = "-l"
         desc = "Low"
         help = "Low resolution on a fax is 96lpi."         
      }
      choice "high" {
         value = ""
         desc = "High"
         help = "High resolution on a fax is 192lpi."         
      }
   }

   # If you don't specify a phone number the job just fails, and 
   # the only way to figure this out is to look at the error message
   # at the bottom of the job details.  Hmm.
   send_exec { 
     if [ "x$PHONE_NUMBER" != "x" ] 
     then
          fax send $RESOLUTION $PHONE_NUMBER $INPUT
     else 
          echo 'You must specify a phone number!'
          false
     fi
   }
}

13.2. Using the Remote Printing Service

There is an experimental service offered that lets you send an email message containing something you'd like printed such that it will appear on a fax machine elsewhere. Nice formats like postscript are supported, so even though global coverage is spotty, this can still be a very useful service. For more information on printing via the remote printing service, see the Remote Printing WWW Site.

13.3. Commercial Faxing Services

A number of companies operate web-based faxing services. EFax, in particular, offers free inbound faxes (to your own dedicated fax number, no less) via email, and fax transmission for a fee. Other companies offer similar services.