Go to the first, previous, next, last section, table of contents.

printfax

printfax Overview

printfax enables you to print out QFAX G3 files, either produced using text2g3 or received using qfax or LFAX. printfax supports four widespread printers standards, HP PCL3 (and better), (LaserJet & DeskJet), Epson 24 bit and Epson 9 pin, and compatible emulations and Postscript.

Details of the way that printfax supports different page and paper sizes are given in section Page and Paper sizes printfax

printfax also includes some pseudo devices such as PIC in full and half sizes and GIF.

Running printfax

The program is invoked as:

ex printfax;`-o dev [-t name] [-x] [-a] [-c n] [-s n] [-q] [-b]
            [-v] [-r range] [-J|j jump] [-P eol] [-l | file]'
where 
-o dev
is a device or file for output.
-t name
is the printer or output format name.
-x
Suppresses the c68 `Any key to exit' message
-a
Enables a PE popup, giving the name of the file being printed and options `Cancel', `Remove', `Abort'. `Cancel' stops the current fax being printed. `Remove' just removes the requester (printing continues). `Abort' aborts all fax pages printing or queued for printing. This option is most useful when printfax is invoked automatically by qfax for automatic printing of received fax; you then get notification of the sender TSI or name (depending of your use of `ALIAS') in the popup.
-sn
Enables printer specific options. At present the only specific support is for HP compatible printers.
-cn
Enables HP data compression. This can result in large reductions in the amount of data sent to the printer
-q
No progress indicator
-v
Force progress indicator
-b
Suppresses bad line replacement.
-l
Causes printfax to print the last received file.
-r range
printfax supports a print range, using comma and dash as separators. For example, to print pages 3,5,7,8,9,12 of a fax.

ex printfax;'-r3,5,7-9,12 somefile_fax'

Ranges are denoted by '-', with individual pages and ranges separated by a comma (e.g. 1-4,8-10).
-j skip
-J skip
These options cause printfax to skip a number of scan lines at the top of either the first page (-j) or all pages (-J). This may be used to remove a "From" line inserted by the remote fax machine when producing an image format. A value of "-J 100" is a good starting value for typical "From line removal".
-P eol
The -P eol parameter defines the number of consecutive EOL (end of line) codes to be considered an end of pager (EOP) marker. A standards compliant fax will use 5 EOL markers to signify EOP, and 'qfax' has always inserted sufficient EOLs when the remote machine did not supply them. Some fax machines may not supply the correct EOLs, and early versions of LFAX did not supply the extra markers.
file
is a QFAX G3 file or output from text2g3.

Due to Pointer Environment overheads, the -a and -v options are mutually exclusive, printfax will display the progress indicator unless you request the popup, if it is possible (i.e. the stdout device is a console). The popup is only displayed if you have the Pointer Environment.

Printer names are denoted as

hp-pcl
(Laser/Deskjet 300 dpi, the default)
eps-24
(Epson 24 pin, 180 dpi)
eps-9
(Epson 9 pin, 120x72 dpi)
ps
ps-ltr
Postscript

Some pseudo-devices are also defined.

pbm
Portable bit map (P4, raw)
pic
PIC (1:1) pixel scale
pic-scaled
PIC (1:2) pixel scale
gif
GIF, whole fax in one file
gif-paged
GIF, each page in separate file

The pseudo-devices allow alternative fax viewers, for example the `qspv' PIC viewer using name pic-scaled. See section PRVIEW keyword

These devices may be used as:

ex printfax;'-t pic-scaled myfax_fax'

The output from this command would be a number of half scale PIC files, one file per page, as follows (for a three page fax).

pfax001_pic-scaled  : REM 1st page
pfax002_pic-scaled
pfax003_pic-scaled  : REM last page

When a alternate viewer (PRVIEW) is defined, it will display the first page of the fax; printfax will continue to decode subsequent pages.

The file name (for paged devices) is fixed as pfax[pageno]_[type_name], unless it is defined using the PRVIEW keyword or -o option. A 'C' numeric format string in the file name will cause the page number to be substituted. Single file devices (hp-pcl, eps*, ps, gif) have a default output name of prtqfax_[type-name], (e.g. prtqfax_ps]).

The Postscript option will give better results than the HP option on >300dpi printers (for example HP-LJ4M+). It also means that printing is possible, via 'ghostscipt' (gs), for printers not support in printfax (for example, the Canon BJ range, Epson Stylus at 360 dpi (in preference to printfax Epson 24 mode (180dpi))).

Users should not that the author's knowledge of Postscript is limited and may not work on non-A4 faxes.

The `type' argument is optional, the default is HP-pcl. (i.e. it's optional if you have an HP printer)

REMark to a ram file using EPS24 mode

ex printfax;'-o ram1_test_dmp -t eps-24 win1_test_fax*'
copy ram1_test_dmp, ser1h

ex printfax;'-o prt ram2_test_fax_001'      : REM to HP printer on prt

ex printfax;'-tpic-scaled -oram1_pf_%02x'   : REM named PIC files
                                            : automatic viewing if
                                            : PRVIEW configured

PFAXINI

printfax options may be supplied using the PFAXINI keyword in `qfax_dat'.

Printer specific features

The printfax Epson 9 pin emulation is fairly simple. It was designed for ease of implementation and compatibility. The quality is not great, but it is readable.

If printfax is used to print faxes automatically then is runs as a independent low priority job. It will wait until the output device is free before it tries to allocate its large memory buffers and decode a fax. You can RJOB it if you want to abort it. It does not open any screen windows in this non-interactive mode.

HP Optimisations

printfax (and via `PFAXINI', qfv) include a number of optimisations for HP LaserJet compatible printers (LJ II, III, IV, and Deskjets).

HP Reduced Image mode

A reduced image is printed using the `-s' (specific flag) set to 1 (`-s1'). In this mode, printfax/qfv does not scale the image, but prints it at pixel size (fax is 200 dpi, HP is 300 dpi), so the image is 2/3 of full size, but will only require half the memory both to be transmitted to the printer and to be printed. This should make it possible to print complex fax on a 1Mb laser printer.

HP 150 dpi

HP mode defaults to 300dpi, you can set 150 dpi with `-s 2' (and reduced and 150 dpi) with `-s 3'. The 150 dpi option is optimised for ease of implementation, not quality.

HP Compressed Data

printfax and qfv support HP Method 2 (TIFF packbits) compression as an option `-c 2'. This is the most supported of the various HP schemes (i.e IIP, all Deskjets, IIIx, IV series).

printfax and qfv also support HP Method 3 (Delta) compression as an option `-c 3'. This is supported by later HP models (PCL5 devices, i.e IIIP, IV, DeskJet 500 series (500, 500C, 550 etc) and presumably other (newer) models as well).

In this mode, printfax/qfv chooses the most efficient method 0/2/3 (none, TIFF, Delta) for each line. This is denoted this below as Adaptive.

In QFAX v2.5 (and later), HP compression mode 9 (-c9)is also supported.

Compression also works with `-s1, -s2 -s3', so this mode may give a large saving in transmission time.

For example, for a typical 2000 scan line fax.

Invocation            HP Printer       Comment
                      data size

printfax file         298115 bytes   ; full file
printfax -c2 file     180967 bytes   ; full file, TIFF compression
printfax -c3 file      35516 bytes   ; full file, Adaptive compression

printfax -s1 file     143597 bytes   ; reduced file
printfax -c2 -s1 file  96599 bytes   ; reduced file, TIFF compression
printfax -c3 -s1 file  27596 bytes   ; reduced file, Adaptive compression

The fax decoding and PCL encoding times (to a ram disk) are essentially the same for each compression method so with a serial printer connection, this may result in a large time saving. The savings will be particularly good for PCL5 devices (LJ IIIP and later, and Deskjet 500 etc).

The adaptive mode (none/TIFF/Delta) is very efficient with normal resolution faxes, as it only sends four bytes for every other line.


Go to the first, previous, next, last section, table of contents.