1viewfax(1)                      Local commands                      viewfax(1)
2
3
4

NAME

6       viewfax - display fax files in an X11 window
7

SYNOPSIS

9       viewfax   [-fnluirvW24]   [-hheight]   [-wwidth]  [-zzoom]  [-ddisplay]
10       [-gwxh+x+y] [-bbell] [-mmemory] filename...
11

DESCRIPTION

13       viewfax displays one or more fax files in an  X11  window.   The  input
14       files may be either raw, single-page faxes received by a fax modem with
15       a program such as mgetty(1), or  tiff  files  such  as  those  used  by
16       hylafax.   The  first  (or  only) page of "PC-Research"-style (DigiFAX)
17       files produced by the ghostscript dfaxhigh or dfaxlow drivers can  also
18       be displayed.
19
20       Input  files  using  any  common  fax encoding such as group 3 (1 and 2
21       dimensional) and group 4 can be displayed.
22
23       The fax images are rendered at full resolution  and  then  successively
24       scaled down by a linear factor of 2 prior to display, until they fit on
25       the screen.  The display can be controlled  interactively  using  mouse
26       and  keyboard  commands.   The left mouse button expands the image by a
27       factor of two and the right button reduces it by the same  factor.   If
28       the  image  is  bigger than the available window size, the middle mouse
29       button can be used to reposition it within the window.  Hold  down  the
30       middle button while dragging the image to its new position.
31
32       If  the  mouse  has  a scroll-wheel it can be used to move an oversized
33       image vertically.  With the shift  key  depressed,  the  wheel  scrolls
34       through  the  pages.  The shift sense is inverted if viewfax is started
35       with -W on the command-line.
36
37       Further interaction is controlled by single-key commands:
38
39       h or Help
40              displays a page of help information.  Type 'q' to return to  the
41              original document.
42
43       p or Prior or PgUP or - or BackSpace
44              displays the previous page from the command-line list.
45
46       n or Next or PgDn or + or space
47              displays the next page from the command-line list.
48
49       Shift HOME
50              displays the first page from the command-line list.
51
52       Shift END
53              displays the last page from the command-line list.
54
55       z      zoom in (same as right mouse button).
56
57       Shift Z
58              zoom out (same as left mouse button).
59
60       u      turns  the  image  upside  down,  which is useful if the fax was
61              originally fed the wrong way into the machine.
62
63       Shift U
64              turns this and all following pages upside down.
65
66       l      turns the image through 90 degrees, to view landscape text.
67
68       Shift L
69              turns this and all following pages sideways.
70
71       m      produce a left/right mirror image of the page.
72
73       Shift M
74              mirror this and all following pages.
75
76       cursor arrows
77              reposition the displayed image if it exceeds the window size.
78
79       HOME   repositions so that the top left corner is visible.
80
81       END    makes the bottom right corner visible.
82
83       Print  if the environment variable VIEWFAX_PRINT is defined,  the  cur‐
84              rent page is printed.  All pages are printed with Shift Print.
85
86       e      if the environment variable VIEWFAX_EDIT is defined, the current
87              page is passed to the editor.  All input  files  can  be  edited
88              with Shift e.
89
90       q      terminates the program.
91
92       Shift Q
93              terminates  the  program with non-zero exit status.  Can be used
94              to abort a shell script, e.g. when the  user  is  previewing  an
95              outbound fax and decides not to send it.
96

OPTIONS

98       viewfax is designed to "do the right thing" when given just a filename.
99       Special cases can be handled with the following  options.   (Note  that
100       tiff-files contain a header which overrides the -f, -n, -h, -w, -l, -m,
101       and -u flags.)
102
103       -f     indicates  that  raw  input  files  are  fine  resolution   (7.7
104              lines/mm) faxes.  This is the default unless the filename begins
105              with "fn".  Tiff and "PC-Research"  (DigiFAX)  files  are  self-
106              specifying.
107
108       -n     indicates  that  raw  input  files  are  normal resolution (3.85
109              lines/mm) faxes.  Each fax line is duplicated in  the  displayed
110              image  to  give  approximately  equal  vertical  and  horizontal
111              scales.
112
113       -hheight
114              specifies the number of fax lines.  If this option  is  missing,
115              viewfax counts the number of lines in the input file.
116
117       -wwidth
118              specifies  the  number of pixels in each scan-line.  The default
119              value is 1728.
120
121       -l     display in landscape mode.
122
123       -u     turn the image upside down.
124
125       -i     invert pixels (black/white).
126
127       -b     preferred warning style: 'a' for audible  bell  (console  beep),
128              'v'  for  visible bell (flash the window), 'n' for neither.  'v'
129              is the default.
130
131       -d or -display
132              use specified X server
133
134       -g or -geometry
135              the preferred size and position  of  the  window,  specified  as
136              widthxheight+x+y.   If  a  position  is  given (x and y values),
137              viewfax asks the window manager to place the window there.   The
138              initial  size of the window is constrained to be at most widthx‐
139              height.
140
141              If the window is subsequently resized due to the user zooming in
142              or out, the geometry is taken as a constraint on the screen area
143              which may be used by viewfax.
144
145              If you do not supply a geometry  value,  everything  works  fine
146              with  ICCCM-compliant  window  managers like olwm, mwm, twm, and
147              tvtwm.  When fully zoomed out the viewfax window will occupy the
148              entire screen.
149
150              Users of fvwm will notice that the title bar and left border are
151              moved off screen when viewfax repositions the window  to  (0,0).
152              A  workaround  is  to  use -geometry +5+23 when using fvwm.  The
153              proper fix would be for someone to update the routine HandleCon‐
154              figureRequest()  in  fvwm/events.c  to correspond to the code in
155              twm/events.c.
156
157       -mmemory limit
158              each page is kept in memory after being  fetched  and  expanded,
159              which  saves time if the user returns to it in the same session.
160              To prevent viewfax from using all the available  swap  space,  a
161              limit  is  placed  on  the  total  size  of cached images.  This
162              defaults to 4 MBytes, enough for about 6 typical pages.  If  the
163              memory  limit  is exceeded, old images are discarded and must be
164              reloaded from disk if the user returns to them.   The  operation
165              of  this  mechanism  is  transparent  apart  from the occasional
166              delays due to reloading.  The value  specified  on  the  command
167              line can be suffixed k or m for kilo- or megabytes.
168
169       -r     the  bit  order of the bytes in the input file is reversed.  The
170              fax specification deals  only  with  serial  data  transmission.
171              Modem  manufacturers  have  to  decide  whether  the  first  bit
172              received should be placed in the most significant or  the  least
173              significant  position  in a byte.  The consensus is to pack most
174              significant first, but the -r flag is available to deal with the
175              opposite order.
176
177       -v     produce some informative messages (verbose mode).
178
179       -zzoom specifies an initial zoom factor.  A full-scale fax will usually
180              not fit on the screen.  If the -z option is not specified, view‐
181              fax scales the image by a power of 2 such that it is fully visi‐
182              ble at a reduced size.  The user can then use the mouse  buttons
183              (see above) to view expanded portions of the image.
184
185       -2     Assume that raw input files use group 3 two dimensional coding.
186
187       -4     Assume  that  raw input files use group 4 coding.  The number of
188              fax lines (-h option) is required in this case.
189

ENVIRONMENT

191       VIEWFAX_PRINT
192              Defines a command that will print one or more fax pages.
193
194
195       VIEWFAX_EDIT
196              Defines a command that will calls an editor on one or  more  fax
197              pages.
198
199
200       These two variables are optional.  If a variable is undefined, the cor‐
201       responding keyboard command is ignored.  If the variable is defined, it
202       should contain the name of a command or executable script that performs
203       the desired function.  The command should  process  a  single  page  if
204       called with a -p page-number argument.  Alternatively, if can be called
205       with just a list of filenames, meaning that all pages  should  be  pro‐
206       cessed.
207
208       Here  is  an  oversimplified  example of a print command.  Note that it
209       assumes that the format is tiff and will fail when  handed  a  raw  fax
210       file.
211         VIEWFAX_PRINT=printfax
212
213         /usr/local/bin/printfax:
214         #!/bin/sh
215         case "$1" in
216         -p) shift
217             dopt=`expr $1 - 1`
218             shift
219             tiff2ps -d ${dopt} -2 -h 11.69 -w 8.27 "$1" | lp
220             ;;
221         *)  tiff2ps -2 -h 11.69 -w 8.27 "$*" | lp
222             ;;
223         esac
224
225

SEE ALSO

227       mgetty   (http://alpha.greenie.net/mgetty/)   controls   data/fax/voice
228       modems.
229
230       hylafax (http://www.hylafax.org/) is a full-function fax  client/server
231       system.
232
233       g3topbm(1)  and  xv(1)  can  be used in a pipeline to view faxes.  This
234       will usually be slower than using viewfax, but xv has many capabilities
235       for manipulating the image and saving it in other formats.
236
237       faxview.tcl,               (ftp://ftp.leo.org/pub/comp/os/unix/network‐
238       ing/mgetty/faxview.tcl.gz) a simple dialog for viewing FAX messages  by
239       Ralph  Schleicher  (rs@purple.in-ulm.de).   This is a useful tool which
240       provides a file menu from which incoming faxes can be selected for dis‐
241       play with viewfax.
242
243
244       CCITT  (now ITU) Recommendation T.4, Standardization of Group 3 Facsim‐
245       ile Apparatus for Document Transmission.
246
247       CCITT (now ITU) Recommendation T.6, Facsimile Coding Schemes and Coding
248       Control Functions for Group 4 Facsimile Apparatus.
249

BUGS

251       The user interface does not comply with any known style guide.
252       The  help  text  looks moth-eaten because it is encoded as a fax.  This
253       avoids dealing with X11 fonts.
254       The program does not refer to the X resources database.
255

AUTHOR

257       Frank D. Cringle (fdc@cliwe.ping.de).
258
259
260
261Frank´s Hacks                  14 November 2004                     viewfax(1)
Impressum