viewfax(1) | Local commands | viewfax(1) |
viewfax - display fax files in an X11 window
viewfax [-fnluirvW24] [-hheight] [-wwidth] [-zzoom] [-ddisplay] [-gwxh+x+y] [-bbell] [-mmemory] filename...
viewfax displays one or more fax files in an X11 window. The input files may be either raw, single-page faxes received by a fax modem with a program such as mgetty(1), or tiff files such as those used by hylafax. The first (or only) page of "PC-Research"-style (DigiFAX) files produced by the ghostscript dfaxhigh or dfaxlow drivers can also be displayed.
Input files using any common fax encoding such as group 3 (1 and 2 dimensional) and group 4 can be displayed.
The fax images are rendered at full resolution and then successively scaled down by a linear factor of 2 prior to display, until they fit on the screen. The display can be controlled interactively using mouse and keyboard commands. The left mouse button expands the image by a factor of two and the right button reduces it by the same factor. If the image is bigger than the available window size, the middle mouse button can be used to reposition it within the window. Hold down the middle button while dragging the image to its new position.
If the mouse has a scroll-wheel it can be used to move an oversized image vertically. With the shift key depressed, the wheel scrolls through the pages. The shift sense is inverted if viewfax is started with -W on the command-line.
Further interaction is controlled by single-key commands:
viewfax is designed to "do the right thing" when given just a filename. Special cases can be handled with the following options. (Note that tiff-files contain a header which overrides the -f, -n, -h, -w, -l, -m, and -u flags.)
If the window is subsequently resized due to the user zooming in or out, the geometry is taken as a constraint on the screen area which may be used by viewfax.
If you do not supply a geometry value, everything works fine with ICCCM-compliant window managers like olwm, mwm, twm, and tvtwm. When fully zoomed out the viewfax window will occupy the entire screen.
Users of fvwm will notice that the title bar and left border are moved off screen when viewfax repositions the window to (0,0). A workaround is to use -geometry +5+23 when using fvwm. The proper fix would be for someone to update the routine HandleConfigureRequest() in fvwm/events.c to correspond to the code in twm/events.c.
These two variables are optional. If a variable is undefined, the corresponding keyboard command is ignored. If the variable is defined, it should contain the name of a command or executable script that performs the desired function. The command should process a single page if called with a -p page-number argument. Alternatively, if can be called with just a list of filenames, meaning that all pages should be processed.
Here is an oversimplified example of a print command. Note that it assumes that the format is tiff and will fail when handed a raw fax file.
VIEWFAX_PRINT=printfax
/usr/local/bin/printfax:
#!/bin/sh
case "$1" in
-p) shift
dopt=`expr $1 - 1`
shift
tiff2ps -d ${dopt} -2 -h 11.69 -w 8.27 "$1" | lp
;;
*) tiff2ps -2 -h 11.69 -w 8.27 "$*" | lp
;;
esac
mgetty (http://alpha.greenie.net/mgetty/) controls data/fax/voice modems.
hylafax (http://www.hylafax.org/) is a full-function fax client/server system.
g3topbm(1) and xv(1) can be used in a pipeline to view faxes. This will usually be slower than using viewfax, but xv has many capabilities for manipulating the image and saving it in other formats.
faxview.tcl, (ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/faxview.tcl.gz) a simple dialog for viewing FAX messages by Ralph Schleicher (rs@purple.in-ulm.de). This is a useful tool which provides a file menu from which incoming faxes can be selected for display with viewfax.
CCITT (now ITU) Recommendation T.4, Standardization of Group 3 Facsimile Apparatus for Document Transmission.
CCITT (now ITU) Recommendation T.6, Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus.
The user interface does not comply with any known style guide.
The help text looks moth-eaten because it is encoded as a fax. This avoids
dealing with X11 fonts.
The program does not refer to the X resources database.
Frank D. Cringle (fdc@cliwe.ping.de).
14 November 2004 | Frank´s Hacks |