Wednesday, December 10, 2008

Faxing in Ubuntu

Today, I have a mission to send out as many fax as possible to attract customer with my laptop and modem. I don't have much choice, Windows used to have good faxing support but that's gone from Vista (fax only available in Vista Business or Ultimate), so Hardy is my only quick choice now (not mentioning other commercial software for Windows).

efax command line works well and can send fax, but I have some problem on converting postscript printed file into tiffg3, because all page is not being converted, some part is being cropped. And I don't want to use command line all the time. Anyways I will document how to do that here.
  • Have your file ready in PS format, easiest way is to use "print to file" option in Print menu of Oo.O.
  • Use ghostscript to convert from PS to Tiffg3, format accepted by efax program
    gs -q -sDEVICE=tiffg3 -dNOPAUSE -sOutputFile=letter-%03d.tiff invitation_cmu.ps < /dev/null
  • You'll get letter-001.tiff - letter-00x.tiff, counted by number of pages in the PS file. Last, use efax to send it out
    efax -t  file...
I search again and found that gfax might be my helper. Anyways, gfax is not working with my mode, although I told gfax to use efax. I don't sure why, but from quick search it seems that some initialize modem command might not compatible with my modem. And there is no debugging or customize initialize command configuration available. So I try efax-gtk next. And efax-gtk works quite well on my Dell XPS M1330 Modem!
  • efax-gtk can send out single/multiple PS file by itself. I just need to change modem initialize command a bit. The key is
    .... M1L3
    Command in the latter part of Modem Init command dialog box. Also, the modem reset command is not working well, so I replaced it with hang-up command
    H
    Note that all command will always being prefixed with "AT", as normal modem command. Ah... I miss the AT command
  • Next, I don't want to just use efax-gtk. I want to print form OO.O directly to efax-gtk!. That can be easily done. First, add a new printer through system-config-printer GUI utility. Select "New Printer" -> "AppSocket/JetDirect" and specify "localhost" and port "9900" in the diaglog box (Yes, efax-gtk is also a network server)
  • Next printer type is "Generic", and model is "Raw Queue", which means we'll just get PS file from printing. After that, name the printer anything meaningfull.
  • Now open efax-gtk and leave it run in tray, then print directly to the new printer. After a while, a efax-gtk dialog will appear to ask for telephone number. It works!

2 comments:

Marco said...

Thanks a lot for your post, as you said it worked.

somsak_sr said...

Somehow it stopped working on Karmic due to modem-manager mess up. efax will never be able to lock the modem. I have to remove modemmanager package and restart /etc/init.d/network-manager in order to have the modem freed.