I recommend getting the ‘pbmplus’ package written by Jeff Poskanzer,
which includes lots of small programs to convert various bitmap formats
into a portable intermediate format (pbm
) that can easily be
converted to fax format with the pbm2g3
program. Further, it comes
with lots of tools to scale, flip, and otherwise manipulate the pbm
bitmaps. Be warned: it includes its own version of G3 conversion programs
(pbmtog3
and g3topbm
), so be careful which one you use.
The programs in the mgetty
package (pbm2g3
and
g32pbm
) behave slightly different (that is, they work!), and are
significantly faster. Note that the pbmplus
package does not
include a graphical front end.
The pbmplus package can be found on most major FTP sites, e.g. on ftp.x.org in the /contrib directory. See ftp.
If you want to view the images using X11, you should get one of the many image viewers, like ‘xview’, ‘xloadimage’ or ‘xv’. See Fax-Tools. A simple, but very fast fax viewer can be found in mgetty/frontends/X11/.
Here are some examples for viewing fax files using g32pbm
:
cat $faxfile | g32pbm | pnmtops -noturn | lp -dest postscript
cat $file | g32pbm | pnmscale -xscale 1.76 -yscale 0.92 |\ pgmtopbm | pbmtodot -360x180| lp -o epson -
$ viewfax -v $file $ cat $file | g32pbm >/tmp/fax.pbm ; xloadimage /tmp/fax.pbm $ g32pbm $file | xv -
There are three easy ways to create g3 fax files, either use pbm2g3
(included in this package. Do not use pbmtog3
from the pbmplus
toolkit. See pbmtog3.), use GhostScript (GNU Software, can be found on
prep.ai.mit.edu) which contains a “digifax” driver that will produce the
required format, or try Chris Lewis’ ‘hp2pbm’ package which will
convert HP Laserjet print files into g3 fax files (hp2hig3
program).
Once you have the right tools, there are lots of ways to create fax files for a wide variety of applications. Here are some examples:
A typical call to ghostscript would look like this:
gs -sDEVICE=dfaxhigh -sOutputFile=/tmp/fax.g3.%d yourdocument.ps
Do not use the “tiffg3” or similar drivers, they will create output files with headers that sendfax does not understand, thus causing the receiving fax machine to reject the data (it will assume that the transmitted headers are garbled data).
If you use Ghostscript version 3.01 and up, you can use the ‘faxg3’ driver as well, its output is identical to the output of the ‘dfaxhigh’ driver except for the 64 byte header. Besides this, there should not be any difference.
I have observed that with Ghostscript 5.01, the output of the ‘faxg3’
driver is rendered better than that of the ‘dfaxhigh’ driver. In
addition, the former is compiled-in by default, while the latter is not.
Thus, the default driver used by faxspool
is now (starting with 1.1.7)
the ‘faxg3’ driver.
pbm2g3
at the
end.
epsf
macros to include
encapsulated PostScript files, e.g. a scanned signature.
faxdvi
package, found at
ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/faxdvi-1.1.tar.gz. Don’t
ask me about, ask him!
hp2hig3
that will read
HP-Laserjet PCL4 files and produce G3 output.
Warning: the G3 files that hp2hig3 emits lack the leading EOL
code, thus causing sendfax
to complain and possibly fail. As a quick
fix, you can pipe those files through g3cat
, it will fix the data.
A rather crude sample conversion program (faxcvt
) is provided in
the fax directory.
Better conversion, including guessing of the format of the input files,
is done by the faxspool
program, also provided in the fax
directory. See Queuing.