HylaFAX client configuration – YajHFC (Yet another Java HylaFAX Client)

I have been searching for a full-featured and platform independent HylaFAX client and finally i found YajHFC (Yet another Java HylaFAX Client). This application is written completely in Java, therefore it can be use for both Linux and Windows environment. YajHFC has the following features:

  • Faxing documents in PostScript, PDF, JPEG, PNG and GIF format
  • Polling faxes
  • Support for generating cover pages from templates
  • Viewing sent and received faxes
  • Phone book
  • Visible table columns may be selected in a dialog
  • Runs under Windows, Linux and Mac OS X (and probably other platforms if a suitable JRE is available)
  • Supports four languages: English, French, German and Spanish

How to setup YajHFC on Linux?

Download the latest version of YajHFC from http://yajhfc.berlios.de and put it the file in /usr/bin directory.
Make a symlink

root@server:~# ln -s /usr/bin/yajhfc_<version>.jar /usr/bin/yajhfc.jar

Make a bash script (eg: hylafax.sh) as below and saved under /usr/bin. Make sure the file is executable

JAVA=`which java`
 $JAVA -jar /usr/bin/yajhfc.jar $1

How to send fax from Firefox?

Edit the /usr/lib/mozilla-firefox/greprefs/all.js to make a system wide setting. Find the section /* PostScript? print module prefs */ and make the changes as below:

pref("print.postscript.paper_size", "A4");
 pref("print.postscript.orientation", "portrait");
 pref("print.postscript.print_command", "hylafax.sh --stdin");
 pref("print.printer_PostScript/default.print_command", "hylafax.sh --stdin");
 pref("print.printer_PostScript/default.print_paper_name", "A4");
 pref("print.printer_PostScript/default.print_paper_height", "297.00");
 pref("print.printer_PostScript/default.print_paper_width", "210.00");
 pref("print.printer_PostScript/default.print_footercenter", "");
 pref("print.printer_PostScript/default.print_footerleft", "");
 pref("print.printer_PostScript/default.print_footerright", "");
 pref("print.printer_PostScript/default.print_headercenter", "");
 pref("print.printer_PostScript/default.print_headerleft", "");
 pref("print.printer_PostScript/default.print_headerright", "");

Now you send fax from Firefox by clicking File -> Print and choose “Postscript/default”

How to send fax from OpenOffice?

Open the OpenOffice?’s printer setup wizard

root@server:~# /usr/lib/openoffice/program/spadmin

Add a new printer (choose PDF printer) and follow the instruction. For the command, make it look as below:

/usr/bin/gs -q -dNOPAUSE -sDEVICE=pdfwrite -sPAPERSIZE=a4 -sOutputFile=/tmp/$USER.pdf - | hylafax.sh /tmp/$USER.pdf