Jonathan Hudson,
Southampton,
Hampshire.
This edition of the QFAX documentation is consistent with version 2.83 of QFAX .
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
The programs that relate to QFAX include qfax, text2g3, printfax, qfv, qfm plus other separate programs (including fsPIC, qfxfnt, and examples). These programs are free; this means that everyone is free to use them and free to redistribute them on a free basis. There are restrictions on their distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of these programs that they might get from you.
Specifically, I want to make sure that you have the right to give away copies of the programs that relate to QFAX , that you can get the source code if you want it, that you can change these programs or use pieces of them in new free programs, and that you know you can do these things.
To make sure that everyone has such rights, I have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of the QFAX related programs, you must give the recipients all the rights that you have. You must make sure that they, too, know that they can get the source code. And you must tell them their rights.
Also, for my own protection, I must make certain that everyone finds out that there is no warranty for the programs that relate to QFAX . If these programs are modified by someone else and passed on, I want their recipients to know that what they have is not what I distributed, so that any problems introduced by others will not reflect on my reputation.
The following precise conditions pertain to QFAX .
If you find QFAX useful you are encouraged to make a small donation to an animal welfare charity.
Class 2.0 support is a late edition to QFAX, many of the examples in the manual assume a Class 2 command set. All QFAX functionality is available for both command sets.
QFAX requires a system with at least 640Kb memory. On Sinclair QL hardware, the standard standard QL serial chip (the `8049') must be replaced with the ``Hermes'', or preferably the ``superHermes'' serial chip 1.1 or equivalent hardware capable of supporting reception at 19200 baud. QFAX is not supported on `8049' serial chips. The underlying QL hardware may still not cope well with V.17 (14,400 bps) fax reception with the qfax transport program.
The qfv, printfax programs require a minimum of 550 Kb free memory.
The qfv program requires the Pointer Environment (PE). The text2g3, qfax and printfax programs do not require, but are enhanced by, the presence of the PE.
The process of converting text and images to and from the CCITT G3 fax format required for fax transmission and reception is very CPU intensive. Running the conversion program text2g3 (ASCII files to G3 format) and printfax or qfv (G3 to screen or printer) requires a lot of CPU power; you may find using these programs on a 68008 machine very frustrating; an SMS, (Super) GoldCard, QXL, ST/QL, or Am/QL system is desirable. The program to send and receive faxes qfax is governed by the efficiency of the serial port. It is possible to send international faxes using qfax, a 68008 QL, Trump Card, 2xflp_ and Hermes, but reception on such low-end hardware is, at times, problematical.
QFAX supports Class 2.0 and Class 2 fax modems. The default is, (for historic and compatibility reasons), Class 2. I recommend that you use Class 2.0 mode if your modem supports it. Class 2 is essentially obsolete and any new developments (for example BFT (binary file transfer) will be in Class 2.0 only). See the CLASS2.0 keyword, section 4.1.
If you are unsure if your fax modem supports either of these standards, do the following.
<
RET>
1.2.
<
RET>
.
<
RET>
.
<
RET>
again to reset the modem.
There is a Class One transport (send/receive) program, LFAX, written by Lester Wareham. The LFAX program is also available free of charge.
If you want to know if you modem supports Class One fax, replace step 6
above with AT+FCLASS=1<
RET>
. If you get OK back, then
your modem supports EIA Class One and you should use LFAX as your
transport program. You may still need the QFAX support programs
(text2g3, qfv, printfax) or equivalent
functionality to prepare and display faxes.
The LFAX program may offer different or enhanced functionality compared to the QFAX /qfax transport program, however in a rare display of synergetic cooperation, Lester and I have ensured that the file formats are compatible and the fax support programs work equally well with either transport program.
You should attempt to receive to the fastest device on your system. For most users this will be a (volatile) ram disk.
Reception to permanent (disk) storage is a desirable feature; it provides data security in the event of system or power failure or operator error. QFAX implements this using an optional, automated backup system whereby faxes are initially received to a ram device, and once the end of document handshake has completed, the fax is copied to a disk. This mode of operation is invoked using the VIA parameter to describe an intermediate reception path in your QFAX_DAT configuration file, see VIA keyword, section 4.10.
You should use the VIA parameter if you are receiving to floppy disk or to a slow hard disk on a slow CPU. (e.g. Miracle Hard Disk on 68008 CPU).
Reception directly to hard disk may be entirely satisfactory using a fast disk on SMS, ST/QL, (S)GC or QXL systems.
This section describes some basic concepts, and the interaction with QFAX components. You may choose to skip this chapter.
When you send a fax using a standalone fax machine, it goes through a number of steps.
QFAX currently consists of the following components:
The qfax program can also receive G3 format files via your modem. It instructs your modem to answer the phone, configures your modem for negotiation with the remote machine and receives the G3 data. If reports the result of the fax reception and maintains a log file.
So far I've mentioned a bit of jargon without really explaining it, before I describe the configuration necessary to use QFAX , here's some explanation.
Very few existing facsimile machines support 2-D encoding. 2-D is supported by all QFAX programs.
When you send a fax using a computer and fax modem, you have encoded the G3 data before the modems start negotiating. Therefore the sending program, qfax, cannot adapt the document coding to that of the receiving machine. In this case, qfax will report that the remote does not support the necessary options if your fax encoding surpasses the capability of the remote machine.
I strongly recommend that you only use 1-D coding unless you know you are corresponding with a machine (or software) that can handle 2-D.
Due to differences between modem chip set manufactures, fax modems may require data either with least significant bit (lsb) first or most significant bit (msb) first. If you send or receive data from your modem with the wrong bit order, then you (or your respondent) will be unable to decode it. Your fax modem manual may tell you the setting you need.
In Class 2 mode, fax modems require you send data to the modem lsb first but return it to you msb first. This is the QFAX default mode for Class 2.
In Class 2.0 mode. fax modems default to lsb for send and receive. This is the QFAX default mode for Class 2.0.
QFAX v2.5 and later can handle both MSB and LSB format fax files, (see QFAX File Format, section C). QFAX 2.6 and later will automatically determine received bit order.
This is unlikely to be an issue for Class 2.0 modems.
QFAX also includes a utility swapqfax that will reverse the bit order in a G3 file.
You may have to determine the bit order your modem requires by experimentation! For example, get a friend to send you a fax. Try to view it using qfv. If this fails, reverse the bit order using swapqfax. OK now ? If so, change the setting in your qfax_dat file.
QFAX is controlled by a (simple) text file that defines parameters used to describe the fax quality and the protocols used by your computer and modem. Defaults are built in that should minimise the amount of work you have to do. The file is calledqfax_dat in your default data directory or defined by the environment variable QFAX_DATA (sic).
SETENV "QFAX_DATA=win1_fax_qfax_stuff"A qfax_dat example file might be:
ID = +968-699407 RES = HIGH SIGNATURE = Jonathan Hudson SERDEV = ser2hr SERBAUD = 19200 MODEM = 5 RMODEM = 3 CODE = 0The general format is KEYWORD = VALUE.
CLASS2.0 = 1
Note that many modems require the ``ID'' to be given in quotes.
ID = "+968-699407"You can test this interactively by trying:
AT+FLID=123456and
AT+FLID="12345"and seeing which one (if any) the modem accepts. Note that if the modem rejects all variations of the ID (AT+FLID) command, you can still give an ID (for use by text2g3) and over-ride the AT+FLID command (see modem options, section 4.24). Class 2.0 uses AT+FLI.
SERDEV = ser3_b38.4k_u2k # superHermes SERDEV = ser1dhr # SMS2, no TRA
This is the baud rate between the DTE (computer) and the DCE (modem). If this parameter is not supplied, the default is 19200 bps.
If the baud rate defined by "SERBAUD = " is followed by a colon and a second rate, then the first value will be used for receive and the second for send. If only one value is defined, then that is used for both send and receive.
SERBAUD = 19200 # 19200 for receive and send SERBAUD = 19200:9600 # 19200 for receive,9600 for send
|
If you have a v.32 fax modem (to 9600 bps), select 3, if you have a v.32 bis (fax to 14400 bps) modem, select 5. This parameter describes the maximum capability of your modem. If you are communicating with a ``normal'' fax machine, then it will only run at 9600 bps, and your v.32bis modem will be negotiated down to this speed. QFAX defaults to 5 for this parameter if it isn't defined. With a QL using Hermes and a v.32 modem, you might set MODEM = 3 and SERBAUD = 19200.
Normally, the MODEM parameter is used for send and receive, but you may find, with some hardware options, that you can send faster than you can receive. The RMODEM command may be used to limit the receive baud rate, in the qfax_dat example I use RMODEM = 3, which limits fax reception to 9600 bps. If this command is not given, then the MODEM value is used for both send and receive.
|
The qfax encoding program, text2g3, defaults to 1-D coding; I recommend that you set CODE=1 to permit reception of 2-D fax )assuming your modem permits); you can force text2g3 to use 2-D coding to those respondents that you know support it by a command line option -2, or tell text2g3 to look in the QFAX phone book for the encoding method.
INDIR = flp2_faxIn_ LOG = flp2_myfax_log VIA = ram2_
With the above settings, when an incoming fax is received, qfax will receive it to scratch files ram2_XXXXXXXX_fax, where XXXXXXX is a random number. When reception is complete, qfax will move the fax to flp2_FaxIn_ppppppppp_mmmmm_fax where pppppppp represents the caller's phone number or a user-defined name. mmmmm is a machine generated sequence number. The temporary file (ram2_XXXXXXXX_fax) is deleted when the fax has been moved to INDIR. The suffix fax may be changed using the SUFFIX keyword (see SUFFIX keyword, 4.32.
Direct Reception of fax to floppy disk is not supported. while qfax will let you do it, it is an extremely anti-social operation and will annoy your respondents (and probably you too).The QFAX aliasing feature will automatically substitute meaningful names for the phone number part of the file name.
EXITBAUD = 9600
# Speaker on at volume level 3 PREINIT = ATM1 L3
You can use the INIT keyword to define modem command(s) to be sent to your modem when qfax initialises the modem. qfax will add a carriage return to the command string. For information on the commands qfax sends by default, see section A. If this parameter is not given, then no additional modem command is sent. Also see section 7.1. INIT commands are sent after default QFAX Class 2.0/2 commands.
# Copy quality check INIT = AT+FCQ=2
This defines a log file that records details of both sent and received faxes including the caller number and time, default is ram2_fax_log.
You only need this parameter in the unlikely event of your modem requiring msb first (SENDBITS = MSB).
PATHFONT = win1_qfaxfnts
DELAY = nnnwhere nnn is the required delay in 20 mSec (1/50 sec) units. For example, to give a one second delay, DELAY = 50. If you have problems with qfax initialising your modem, set DELAY to a large value (say 200), work down until it fails, and then increase it slightly. You don't need to be connected to the phone system for this, just invoke qfax;`-v -R' and wait until qfax returns `NO CARRIER'. Using a good modem and a fast system, it is possible to set DELAY=0 to minimise startup times.
PRINT = printfax -q -aThe command is run as given followed the the name of the fax file; it does not have to be a fax print program. Note that you have to also tell qfax that you want automatic printing, see The command is defined as it would be on a normal computer, i.e. without any ex, ; ,, quotes or other QDOS nonsense. printfax may use the PFAXINI keyword to obtain other default options.
Caution:Another fax may arrive while the first is being printed, your hardware must be robust enough to support this possibility and have sufficient memory (at least 2Mb to be comfortable).
Dial prefix ATD Reset Modem ATZ Setup Command 1 AT +FCLASS=2 Setup Command 2 AT +FBOR=0 +FCR=1 +FAA=0 Setup Command 3 AT +FLID = %s (%s replaced by the ID parameter) Setup Command 4 AT +FDCC=%d,%d,%d,%d,%d,%d,0,0 (%d replaced by RES MODEM WIDTH_S PAGE_S, CODE,ECM)It is now apparent that a number of supposedly Hayes/Class 2 compatible modems cannot accept the format of these commands. All these commands can be over-ridden by qfax_dat options.
Class 2.0 modems use:
Dial prefix ATD Reset Modem ATZ Setup Command 1 AT +FCLASS=2.0 Setup Command 2 AT+FBO=0 +FCR=1 +FLO=2 +FAA=1 +FNR=1,1,1,0 Setup Command 3 AT +FLI = %s (%s replaced by the ID parameter) Setup Command 4 AT +FCC=%d,%d,%d,%d,%d,%d,0,0 (%d replaced by RES MODEM WIDTH_S PAGE_S, CODE,ECM)
DIAL = <
dial command prefix >
e.g. DIAL = ATDP (for pulse dial)
ATZ = <
modem reset command >
e.g. ATZ = AT&F (Reset to factory setting)
Format is MDMx = <
value >
, x is (1-4).
These are governed by the following rules:
MDM1 = <1st Modem setup string> to MDM4 = <4th Modem setup string> e.g. # for modems that expect semi-colon as command delimiter MDM1 = ATS0=0;S2=255;S7=120;S12=255;+FCLASS=2 We don't give a MDM2, so qfax value is used # Ignore +FLID command completely # (text2g3 will still put any ID on fax head line) MDM3 = # Use my specific G3 parameters MDM4 = AT+FDCC=0,3,0,0Using the above examples, sending a fax, with the following lines in QFAX_DAT
ATZ = AT&F DIAL = ATDP MDM1 = ATS0=0;S2=255;S7=120;S12=255;+FCLASS=2 MDM3 = MDM4 = AT+FDCC=0,3,0,0the following commands would be sent to the modem
AT&F ATS0=0;S2=255;S7=120;S12=255;+FCLASS=2 AT+FBOR=0 +FCR=1 +FAA=0 AT+FDCC=0,3,0,0 ATDP699407As with other user defined qfax modem commands, you need not give the AT.
The lines:
ATZ = &F DIAL = DP MDM1 = S0=0;S2=255;S7=120;S12=255;+FCLASS=2 MDM3 = MDM4 = +FDCC=0,3,0,0are equivalent.
The PHONEBOOK keyword defines the (optional) QFAX phone book.
PHONEBOOK = win1_qfax_phone
The PHONEBOOK format uses a KEY=value system. The keys are:
|
NAME=RacingSailboats,ALIAS=rsb,TSI=01712231448,FULL=00441712231448 NAME=IMTAC, TSI=968797709, FULL=797709, 2D NAME=JochenMerz, ALIAS=jm, TSI=49203502012, DCODE=00- NAME=Jonathan, ALIAS=jrh, TSI=1703867843, DCODE=00-
In your entry for me (jrh), the TSI is the cleaned up ID (i.e. numbers only) that I send out with faxes The NAME field is the directory where the inbound faxes are to be stored, ALIAS is an abbreviation you can use when sending, DCODE is any additional dial information not in the TSI. As you may sometimes get my 1-D answer-machine, this entry does not have 2D set.
Note also that MENU_REXT FILE_SELECT has the annoying habit of displaying directories in lower case, which breaks on case independent file systems (uqlx); to combat this MENU_REXT aberation, qfax creates only lower case directories from phone book entries.
Note that any TSI values should only contain numbers and letters (no punctuation). If the user's ID setting is +44 (0)1703-867843, then use TSI=4401703867843.
ex qfax;'-s jrh ram2_jrh_fax'You could also
ex qfax;`-s Jonathan ram2_jrh_fax'or even
ex qfax;`-s 00-44-1703-867843 ram2_jrh_fax'
Somehow I think I'd use the first one. Faxes now go into the named directory, much easier than numbers, where an PHONEBOOK entry exists. So. in the above example, with an INDIR = flp1_ and the above entry in QFAX_PHONE, a fax from me, would be stored as:
flp1_jonathan_nnnnn_faxwhere nnnnn represent the current numbering scheme.
flp1_Jonathan_00000_fax flp1_Jonathan_00001_faxYou should be aware of the following implementation details that influence name matching.
NAME=John,ALIAS=JJ,TSI=123456 NAME=JimJohnson,ALIAS=John,TSI=78778then `qfax -s John ...' would dial 78778.
You must also ensure that ALIAS names do not result in file names that exceed the file system limits.
There are many instances where a respondent gives a national phone number in the TSI that is incompatible with international dialling in your country. The FULL field allows for this. For example, a respondent in the UK might set their TSI to 01703-123456, and to dial that number from overseas, I need to dial 00-44-1703-123465. The combination of TSI and dial code will not do this, but I can override this by setting FULL to 00-44-1703-123456.
Programs in the QFAX suite (qfax, text2g3, qfv, printfax) take a number of sometimes arcane and immemorable command options, many of which you will need every time you use the program. To save you having to type these options in every time, default options can be preset using the following keywords in qfax_dat. The keys are:
|
text2g3 provides two macros to automatically insert the date in faxes. These default to the full names for days and months in English in standard Unix usage. These keys may be used to define native (non-English) language date fields. Usage of these keys is described in for text2g3 section 6.1 and section 6.2.10.
for example:
LEFTMARGIN = 160 LEFTMARGIN = 0.815in LEFTMARGIN = 20.8mmshould all have the same effect.
Format 'devices' may have a program associated with them, that is invoked after the first page of the fax has been decoded, giving the facility to use an alternative fax viewer.
The format is PRVIEW = name, program, file. If the file name contains a 'C' numeric format, then the page number is inserted. The printfax 'pbm' and 'pic' types decode each page to a separate file. If the output device name starts with a vertical bar, then the output of printfax is piped to the standard input of that program.
For example:
PRVIEW = hp-pcl, ,prt PRVIEW = ps, ,|lpr -l PRVIEW = pic-scaled, win1_viewers_qspv,win1_tmp_fax_%03d_pic
The output file specification may be overridden by a printfax command option.
The default is no PRVIEW entries are defined.
The full list of device names supported by printfax is described in the section Running printfax, 9.2.
The Class 2 standard requires that all AT commands issued by the fax software have replies from the modem terminated by a string such as OK or CONNECT ...unless you have an ELSA 28.800 modem, which doesn't work like this. This 'intelligent' modem assumes that a AT+FDR command can be terminated by +FHNG:0, when the standard requires +FHNG:0 followed by OK. If you have one of these modem, set HANGUPOK in qfax_dat.
|
The usage of these keys, and implications are described the the section 5.1.
SAVETHING = win1_qfax_savething_datDetails of QFAX Thing functionality is described in section F.1.
so:
# In QFAX_DAT XDIAL = 00-44-1 #In QFAX_PHONE NAME=RacingSailboats, ALIAS=rsb, TSI=0712231448, FULL=[712231448then
ex qfax;"-s rsb rsb.fax"will dial 00-44-1712231448.
ex prog,ser,log,ser;
If the qfax_dat DATA = option starts with an '@', then on data connect, a file may be displayed telling the caller why they cannot make a data connect. Your modem must support adaptive answer for this.
DATA = @win1_qfax_nologin_txt
The +FAA parameter is automatically set to +FAA=1 if DATA is defined. A suitable program as a DATA client may be found as smbx (Simple Mail Box). smbx is (was?) maintained by Dave Woodman; he once could be contacted on his dedicated QFAX/SMBX line (+ 44 1628 541753).
Note this functionality may only work in this release with modems that return CONNECT FAX / CONNECT speed etc for fax/data in adaptive (+FAA=1) mode. This may be configurable in a future version.
A suitable 'serial monitor' front end that may be configured for this or other modem responses is available as SMBOX_BAS. This may be compiled with QLib (I am informed by a normally reliable source). SMBOX_BAS is not subject to the QFAX (or SMBX) licence and is public domain.
SMBX is not intended as a QBOX replacement or in competition with it. It is intended to provide simple data/e-mail/file transfer facilities for "QBOX Refugees" (or is that "QBOX refusees") who do not need the full capabilities of a traditional BBS.
CHILDLOG = ram2_smbx_log
The key FAA forces a setting of the +FAA parameter for receive.
FAA = 2
For (example) Supra 'silent' answer. If this key is not defined, qfax uses its defaults for +FAA (0 or 1).
If you have CSM ('Client Server Manager') on your system, qfax can run a startup script, for example to check for the existence of other programs that might be using the serial port. The STARTSCRIPT key defines such a program file (BASIC if you have Minerva, compiled for all OS types). The script is always run before a WAIT or MONITOR session (-w, -W, -m, -M). The script is never run for a GRAB (-G) or spawned send (-z) session. The key RSFLAG controls whether the script is run for receive (-r, -R) or send (-s, -S).
The only qfax CSM REQUEST that a startup script can make is EXITPARAM.
If you have CSM on your system, qfax can run a shutdown script, for example to reinstate any other program that might be have been previously using the serial port. The STOPSCRIPT key defines such a program file (BASIC if you have Minerva, compiled for all OS types). The script is always run after a WAIT or MONITOR session (-w, -W, -m, -M). The script is never run for a GRAB (-G) or spawned send (-z) session. The key RSFLAG controls whether the script is run for receive (-r, -R) or send (-s, -S).
The RSFLAG key defines if any defined startup or shutdown script is run during startup or shutdown processing for receive (-r, -R) or send (-s, -S) sessions. The key may take the values R, S or RS (or SR).
RSFLAG = RS
The default is RSFLAG is blank (no scripts invoked).
APRES=+FREVto remind themselves of their current ROM (a)version.
The NOPOLL key will prevent qfax from issuing any polling commands. For modems that do not support polling commands (+FSPL, +FLPL). The default is to support poll commands.
|
EDR=1 # RING1 is fax
ECM=1 # Use ecm
|
# This is a comment in my QFAX_DAT File # I use a hash as it can't be mistaken for much else ID = +44 123 456789 # End of QFAX FileI recommend you use something like a hash to define comments, it makes it simple to see what is in the file. A utility qparse is available to display the effect that any given qfax_dat will have on QFAX programs.
Please note: The above may seem like heavy going. in many cases the default values will be suitable for your modem.
This header is also filled in, when receiving, by the qfax program from the parameters negotiated with the sending fax machine, so if you receive a fax encoded in low resolution into your default high resolution environment, the qfv and printfax programs don't get confused.
The QFAX file format is described in section C.
|
|
The guaranteed printable area defined by the ITU-TSS is less than
these limits, text2g3 will automatically page files at the following
pixel sizes, unless the length is set to unlimited, or you page manually.
WIDTH_S = 0
PAGE_S = 0
WIDTH_R = 0
PAGE_R = 2
|
Although text2g3 will fill a page size to extreme margins, many ``standalone'' fax machines will not print to these margins. The header margins used by text2g3, (60 pixels), should be considered a minimum.
Using the standard text2g3 default left margin of 160 pixels and
assuming and equivalent right margin and a standard QFAX ID-line, then
the page sizes in character sizes (for the default font) are
approximately.
|
text2g3 pages the fax by inserting RTC code words at the pixel line counts given in table 5.1. The page size and width parameters are stored in the header, as is the number of pages (RTC sequences inserted).
text2g3 v2.5 (and later) can include pages of varying size and resolution in a fax. This is described in section C.2.11.
qfax receive uses the WIDTH_R and PAGE_R parameters to negotiate with the remote device. The negotiated parameters are stored in the file header. qfax recognises page breaks from data stream DLE ETX; it will add RTC if the modem does not return it. The number of pages received in stored in the file header and the file name is recorded in the file 'INDIR_QFAX-lastfax', where INDIR is your top level inbound fax directory (IN_DIR). This is overwritten with each new fax, and is used by qfv and printfax for their "last fax" options.
The decoder is common to both qfv and printfax. It has undergone a number of changes for v2.x to cope with variable page sizes.
Faxes do not always conform to the sizes specified by the ITU-TSS. For example, I frequently receive faxes from a machine that I know is a manual, A4 page feed, that exceed the nominal 2286 pixel lines. The decoder is necessarily page based and uses a number of algorithms, including ratio of black to white pixels, number of scan lines, and proximity to next RTC or end of file to determine the validity of a potential page. These algorithms have proved reliable, but there may be faxes that break them.
The fax viewer, qfv, can band faxes into available memory. The printing utility, printfax, currently requires that contiguous memory is available for a complete fax page.
You can force qfv to use a reduced memory allocation (thus saving memory) and banding fax using the -X memsize option. The minimum value of memsize is 120000 bytes.
ex qfv;"-X 204800" : REM Use 200K for fax image decodingqfv tries to be flexible in the allocation of page memory without being profligate or encouraging fragmentation; if your fax exceeds its claimed page size, then qfv will still attempt to allocate enough memory and display the fax.
printfax defaults to ISO A4 paper size on HP printers and 11in forms on Epson. The default paper size may be set using either the qfax_dat PAPERSIZE key word, with values of A4, Letter or Legal.
PAPERSIZE = legalThe paper size may be defined (HP) by the printfax command line option -f, with numeric values of 0 = ISO A4, 1 = US Letter and 2 = US Legal. The way the printer handles different page and paper sizes depends on the model. Epson printer drivers do not currently support the PAPERSIZE keyword.
Full support is provided for ISO A4 (297x210mm), US Letter (11x8.5in) and US Legal (14x8.5in) paper sizes. Faxes are always scaled with respect to the ITU-TSS width parameter to fit within the paper size. Faxes of ISO aspect ratio (sqrt(2) : 1), (G3 A4xA4, B4xB4, ?? x unlimited), i.e. the G3 width parameter is equal to the G3 page length parameter or the length is unlimited, are scaled to completely fit on either ISO A4 or US Letter paper depending on your PAPERSIZE setting (in this instance US Legal is considered to be US Letter, as the width is the scaling factor).
If the both the G3 width and the page length parameters are defined, then the scaling is taken from the width, and the printout is paged according to your paper size, so if you receive a G3 A4 wide, G3 B4 page length fax, and select US Legal paper, then each fax page will be printed on a single sheet. If you print the same fax on ISO A4 or US Letter paper, then each fax page will be printed over 2 sheets of paper with about the last 1/4 of the fax page on the second sheet. Each fax page will start on a new sheet.
When printfax takes the paper size from qfax_dat (either defined or by default ISO A4), it assumes that the printer default is set for this size of paper. If you use the -f command line option to override the QFAX default, then printfax will send a printer command to use the -f selected paper size and send a printer command to set the paper size back to default when the fax has been printed.
printfax defaults to 300dpi on HP printers; 150dpi printing may be selected with the printer specific flag -s 2. This will be necessary to print A4 x B4 length fax to US Legal paper on a 1Mb LaserJet. The 150dpi algorithm has been chosen for ease of implementation and speed rather that quality, it is however (almost) readable.
printfax on HP PCL4 or PCL5 also supports 200dpi mode; this is excellent as no scaling is required giving excellent quality and speed. This mode is recommended if you a PCL4 or better printer.
All combinations of fax sizes may be printed with the -s 1 specific flag to print at pixel size. Note that at 303mm, unlimited (2432x3218) pixels, the last 32 pixels of each line are clipped by the printer and the page length will exceed the reproducible size on US Letter paper.
The -s flags may be OR'ed to do unscaled 150dpi printouts (-s 3).
The Epson drivers only support A4 widths and will refuse to print anything wider. They will however print B4 lengths without introducing a page break. If this causes a problem on page printers (Stylus etc), please let me know, and a form feed will be added. A future release may support wider sizes. The Epson drivers currently ignore the PAPERSIZE parameter.
I do not have access an Epson printer printer of any description. A future release of QFAX may use external printer drivers, making user development of better drivers for hardware other than HP a more practical proposition.
I would recommend using HP printers due to their execellent quality, reliability, and ease of programming.
text2g3 takes an ASCII text file (prepared by a standard text editor such as MicroEmacs, QED, Ed, QD etc) and converts it into a G3 format file (with a QFAX header).
It is also possible to use QUILL or similar word processor to produce formatted faxes and use underline, bold, and italics. User defined fonts are also supported.
The QFAX fonts include both monospaced and proportional fonts. QFAX imposes a 20mm left margin, and allows 85 characters per line (in A4) with the smaller fonts and around 42 characters per line with qfaxbig_font. You can define the left margin (see section 4.28).
The default font (QFAX_FONT) has 256 characters, some of the control characters print out as graphics symbols; the upper half of the character set is an IBM character set. You can use text2g3 and qfv or printfax to see what this looks like by processing the example file Qfont_txt. A utility is provided to edit monospaced fonts, see section Changing QFAX font, 6.1.2.
Many of the other fonts contain less than the full ASCII character set. The qfxfnt utility currently only works with monospaced fonts. A list of fonts is supplied, see section QFAX Supplied Fonts, E.
ex text2g3;'flp2_qfont_txt -o ram1_' ex printfax;'-o ser1hr -t eps-24 ram1_qfont_fax_001'See the later descriptions for the parameters to the programs.
~S screen_dump [position] [magnification] [invert] [square]This command includes a QDOS screen image as a graphic in your fax. The command assumes that the image is based on a screen width of 128 bytes (i.e. the 512 pixel width format), but does not restrict you to a 256 line image, the program just reads 128 byte screen lines until it hits end of file. The QL screen is distorted (pixels are extended vertically), so text2g3 repeats some screen lines to give images that are about 98% square on paper.
~S flp1_worm_scn 0 -2It's centred and double size (also not inverted and not square so we compensate for video distortion).
~S flp2_test_scn 160 1 1This one is starts on the text margin and is not magnified (512 pixels across), but it's inverted (assumed not square).
text2g3 employs a very simple algorithm for including QDOS screens, any black screen pixel will be black on the paper and other colour will be white. In you use inverse, then any black screen pixel will be white and anything else will be black. An example is supplied, worm_scn. I suggest you display this on the monitor
lbytes worm_scn, hex("20000") : REMark on a QLthen print it out using text2g3 and printfax to see the differences. (It's included as eg_test_fax). Note that the solid red and green areas are white on paper, but the stipples used to shade the `mountains' are reproduced as a grey pattern they mix black and a colour. If you want stippled patterns in the fax, then use black / colour stipple patterns on the screen. I found worm_scn on an old disk somewhere; it's a good example, I trust I have not offended the copyright holder.
The QFAX utility program fsPIC will dither PIC images to give a simulated grey scale. The pbm images produced by this program may be included in faxes using text2g3 and give much more detailed images. Try it on the worm image and see.
~Q PIC_Image [position] [magnification] [invert] [square]This option allows the inclusion of graphics in the PIC format. This format has a header to the screen image that defines the x and y pixel dimensions of the image. QFAX does not restrict such images to the any given size, and the image does not have to be a standard screen size. The header format is described in the QPTR manual.
The QFAX package includes four such images, (PIC format). They have been converted from other free sources and are square, so they can be used as follows:
~Q HeadTms_pic 0 -1 0 1The ``Facsimile Message'' graphic in Times-Roman.
~Q HeadHlv_pic 0 -1 0 1The ``Facsimile Message'' graphic in Helvetica font.
~Q QFax1_pic 0 -1 0 1The QFAX logo on one line (note this is about 1400 pixels across).
~Q QFax2_pic 0 -1 0 1The QFAX logo on two lines.
The worm_pic graphic is the worm_scn graphic in PIC format, it has graphic distortion (i.e. non-square pixels) so it does not have the 'square' argument.
~Q worm_pic 160 2
~q PIC_Image [position] [magnification] [invert] [square] ~s SCN_Image [position] [magnification] [invert] [square]These additional commands allow you to overlay text and graphics in the same horizontal area. By combining the position parameter and spaces in the text, it is possible to surround a graphic with text. The example files test_txt and test_fax show the results that can be obtained using these commands. It isn't desktop publishing, but the results are quite good. When calculating screen positions, use the following sizes for the default qfax_font:
The graphic features may allow you to create (semi-)professional looking faxes without access to DTP programs.
~b pbm_file [position] ~B pbm_file [position]It is also possible to include bitmaps in pbm (Portable Bitmap) format. QFAX / text2g3 supports the raw, P4, (that is monochrome binary variation) of pbm. This is included as a aid to importing black and white graphics that have been generated from external sources without the trouble of using native screen formats with the inherent overhead of extra size and video scaling. An example of an external source might be a utility to convert Epson printer dumps to pbm. The ~B command inserts and ~b command overlays.
The example test_txt has been changed from QFAX v1.5 to include a pbm file. Note that this image is half the size of the PIC format frog_pic in earlier versions.
~b frog_pbm 560
So, if today is 27th September, for the two flags, the results would be:
QFAX allows you to define the textual names for the months and days in qfax_dat, so, a non-English user does not have to have English dates in a native language fax. The qfax_dat key words are MONTHS and DAYS. The equivalents supplied for these keywords are a comma separated list. Do not surround the text with quotation marks.
For example, to use three character month and day names:
MONTHS = Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec DAYS = Sun,Mon,Tue,Wed,Thu,Fri,Sat DAYS=dimanche,lundi,mardi,mecredi,jeudi,vendredi,samedi
text2g3 supports bold, underline and italic by the following ~
switches that may appear anywhere on a line. A tilde ``~'' may be
included by specifying it twice ``~~''.
The commands are :
|
~O had previously been used an alternative code for Overlay PIC format graphic. The ONLY codes for PIC graphics now are:
~Q parameters : Insert PIC graphic ~q parameters : Overlay PIC graphicExample QUILL / XCHANGE files are included in the archive as quillfax_doc and quillfax_txt. The example (XCHANGE) print driver is xchange_dat_qfax.
The xchange_dat_qfax file was constructed using the following criteria:
The output device is set to alternate (none). Lines/page are set to 60 Char/line is set to 82 Continuous forms set to Yes EOL set to LF Emphasis On ~E Emphasis Off ~e Underline On ~U Underline Off ~u SubScript On ~O SubScript Off ~oIn QUILL, use Design to set the top and bottom margins to a suitable value (zero), and set the left and indent margins to zero and the right margin to 80. The footer was set to none. The interaction between page size in QUILL, page length in the driver and what you actually get depends on your usage of graphics in the fax, which QUILL does not know about.
For output, F3 P(rint) to a file, and use text2g3 to process the file into a fax.
This method should work with any word processor that allows you to define escape sequences for bold, underline etc. You can add additional features using the 'user defined font' feature. If you wish to generate flush right margin faxes, you now have a means to do so.
text2g3 allows any number of fonts in a document. These fonts are referred to below as font0 to font9. If you do not define any fonts, then font0 is defined by text2g3 as the normal qfax_font font. It is recommended that font 0 is a monospaced font of similar dimensions to qfax_dat in order to maintain the format of the fax header inserted by text2g3.
A font is defined for subsequent use using ~F, with parameters of font_file and font_number. So given font0 is the standard QFAX font, we could define font1 and font99 as:
~F flp2_afont_font 1 ~F flp2_bfont_font 99where the files flp2_afont_font and flp2_bfont_font are user defined font files. We can then use these fonts in a fax using the ~N notation, where N is the font number (for example) ~1 switches to font1. ~0 switches to the default font (qfax_font if you haven't redefined it).
~F flp2_afont_font 1 ~F flp2_bfont_font 99 This is an example of ~1font one~0 and ~99font two~0. OK.
This is an example of font one and font two. OK.
The text would start in the normal font, the phrase font one is encoded using the font from the file flp2_afont_font, the and is back in the qfax_font, and phrase font two is encoded using the font from the file flp2_bfont_font, and the last part is back in qfax_font. The fax header is always in font 0, usually the qfax_font default, but you can define your own default font if you want, either using FONT = in qfax_dat, -f on the text2g3 command line or ~F filename 0 in a text file.
The Bold, Underline and Italic commands may be applied to user defined fonts.
The ~number command to indicate a change of font is terminated by the first non-numeric character. If you want to change the font and then print a numeric character immediately, then you can put a exclamation mark after the number. This is ignored.
~12!1234567890 (change to font 12, output "1234567890") ~13!!He exclaimed (change to font 13, output "!He exclaimed")
Font numbering does not have to be sequential.
The macros are indicated in the text file using ~mN where N is a hexadecimal digit in the range (0 - f), for example, ~m0 ~m9 ~ma ~mf. The macro expansions are defined in another file, in the format N:text; where N is the macro number and text is the macro text. You pass the name of the macro file to text2g3 with the -m flag.
So, to put this all together:
In the text file:
To: ~m0 Dear ~m1, ... ~m3, ~m2in a file macros_bc
0:Bill Clinton 1:Mr President 2:Jonathan Hudson 3:Yours faithfullythen ex text2g3;'-m macros_bc test_txt'
In the fax
To: Bill Clinton Dear Mr President, ... Yours faithfully, Jonathan Hudsonin a second macros_gg file
0:Graham Goodwin, Fur~EST~e Ltd. 1:Graham 2:Jonathan 3:Best Regardsthen ex text2g3;'-m macros_gg test_txt'
In the fax
To: Graham Goodwin, Fur{\bf ST} Limited Dear Graham, ... Best Regards, Jonathan
0:this is a macro 1:Also, ~m0 as well
Then, in a fax, ~m1 will expand to ``Also, this is a macro as well''.
A macro may contain references to other formatting (~) commands, including those that are only recognised at the start of a line, such as ~Q to include graphics. Where such a reference is made, then the reference must be at the start of the line.
0:~Q mysignature\_pic 160 1 1 1then ~m0 at the start of a line, will cause the graphic to be included. In the above example, I could have had a fifth macro, ~m4, defined in macros_bc as 4:~Q jrhsig_pic, which a formal signature (``Jonathan Hudson''), while in macros_gg, 4:~Q jsig_pic, which is an informal ``Jonathan''.
In the example, the data is taken from DATA statements in the program; a more practical example might read an EXPORT file from Archive, or data extracted by some means obvious to users of DataDesign or DBAS.
Note that the examples may generate quite a long command line.
text2g3 can include existing fax files in a fax. A special case of "~X" without a filename instructs text2g3 to finishing processing. This can be used to prevent extraneous blank lines from being included after including an old fax file. Included fax files start on a new page, and any new material after an included fax file will also start a new page. text2g3 headers will not be added to included pages, for various technical reasons (i.e. it's difficult).
Included fax do not need to be of the same coding, resolution or length as the new fax.
given the existing files
demo1_fax demo2_faxif the file new_txt contains:
~X demo1_fax ~X demo2_fax ~X Never gets herethen 'ex text2g3;"new_txt"' will create a fax file 'new_fax' that incorporates the existing fax files demo1_fax and demo2_fax.
if the file newer_txt contains:
Let's go. ... This is a fax file. This is the first page ~X new_fax This is a fax file. This is the last page ... The endthen 'ex text2g3;"newer_txt"' will create a fax file newer_fax.
The file newer_fax will contain an initial page from the text starting "Let's go", then the included pages of the existing fax new_fax (itself made from the old demo1_fax and demo2_fax files), then a final page ending "The end". The page starting "Let's go" will have a new headline with the current time/date (and P.001/002), the final page will also have the the current time/date (and P.002/002). Included files retain their original header line.
Included pages will have the bit order of the current coding environment.
ex text2g3;'-C myqfax_dat etc
ex text2g3;'[-f fontfile] [-v] [-x] [-r res] [-o outdir] [-2] [-w N] [-h N] [-l N] [-m macrofile] [-u stemname] [-a name] [-M] file1 ... fileN'where:
ex text2g3;`-m macro_fred -u fred faxmerge_txt'==
>
fred_fax_001
ex text2g3;`-m macro_bill -u bill faxmerge_txt'==
>
bill_fax_001
file1 ...fileN defines the files to process, wildcards are supported. for example:
ex text2g3;`-r 0 -f flp1_qfax_font -o ram3_G3_ flp2_*_txt'The output file has the extension _fax.
ex text2g3;`-r 0 -o ram3_G3_ flp2_test_txt'gives a files ram3_G3_test_fax.
text2g3 includes a header on the top line of each page giving the SIGNATURE and ID fields from your qfax_dat file and a time stamp. This is a legal requirement is some countries (i.e. USA). Other encoding programs (for example the gs fax driver) may not do this. This line is of the form:
Jonathan Hudson +968-699407 19/01/94 19:05 P. 001/001 SIGNATURE ID TIME STAMP Page counts
T2G3INI = -x -o win1_fax_output_
The qfax program supports many options, you can force Class 2.0 or Class 2 mode from the command line. This option applies to all examples, but is not repeated again.
ex qfax;'[-2] [-2.0] etc
ex qfax;'-C line1qfax_dat' etc
ex qfax;'[-i ini] [-l logfile] [-v] [-x] [-eN] [-bN] [-s phone file | -S phone [file] | -z phone file]'
ex qfax,#serial_channel,#dontcare,#info;'-z etc'
file file to send to the phone number.
for example
ex qfax;'-v -l ram2_sfax_log -s 010-968-699407 ram2_jh_fax'Send jh a fax, log information to screen and to ram2_sfax_log
ex qfax;'-i M1 -v -s graham ram2_Graham_fax'
You can have up to 30 `-i' parameters, these are sent after the default qfax initialisation, so you can over-ride the defaults.
Caution: The -s TelNo File or -S TelNo [File] must be the last parameter to this command. The -s and -S options are mutually exclusive.
The -S version of the qfax command allows you to poll a remote machine that supports polling. In this case you make the initial connection (and pay for the call), and you receive the fax. This command requires a phone number (or alias) and optionally a file name; if you supply a file name, qfax will send your file before receiving the polled fax.
qfax send supports ALIAS. Given a suitable ALIAS or NAME in qfax_phone, and QFAXINI = -v -l ram2_sfax_log, you could do the first example as:
ex qfax;'-s jh ram2_jh_fax'
INDIR = ram1_infax_and I sent you a fax, with my ID setting as +968-699407, it should be received as:
ram1_infax_968699407_00000_fax dir RAM1_infax_968699407_gives the faxes received from +968-699407.
Two subsequent faxes would be received as:
ram1_infax_968699407_00001_fax ram1_infax_968699407_00002_faxWith a suitable PHONEBOOK NAME, these files may be received as:
ram1_infax_jonathan_00001_fax ram1_infax_jonathan_00002_faxA log file is maintained for sent and received faxes, giving caller number, pages, time, baud rate, resolution etc.
qfax can receive in a number of modes.
Caution you may need to invoke qfax from a ram disk to avoid disk I/O related problems on low end systems.
ex qfax;'[-p] [-v] [-x] [-l logfile] [-i ini] [-e N] [-P poll] -R' ex qfax;'[-v] [-x] [-l logfile] [-i ini] [-e N] [-P poll] -r pattern' -v, -l, -x, -i, -e function as for send
Let the modem answer the phone after a given number of rings. qfax uses its internal file naming convention. qfax can either exit after a single fax, or continue to answer and receive until you RJOB it, or let qfax ask you want you want to do.
ex qfax;'[-p] [-v] [-x] [-l logfile] [-i ini] [-e N] [-P poll] -w 2' ex qfax;'[-p] [-v] [-x] [-l logfile] [-i ini] [-e N] [-P poll] -W 3' ex qfax;'[-p] [-v] [-x] [-l logfile] [-i ini] [-e N] [-P poll] -m 3' where -v, -l, -x, -i, -e, -P function as above
ex qfax;'[-p] [-v] [-x] [-i ini] [-e N] [-l logfile0] [-P poll] -g' where -v, -l, -x, -e, -i, -p, -P function as above
ew qfax,#c4,nul,#c1;[-p] [-v] [-x] [-i ini] [-e N] [-l log] [-P poll] -G where -v, -l, -x, -e, -i, -p, -P function as above open #4, 'ser2hr' open #5, 'con' ... ew qfax,#4,#5,nul;'-p -v -G' ... close #4 close #5
With QBOX BBS, the something like the following may be specified:.
win1_qfax %>>nul %>ram1_fax_log %< -xvGThe stderr channel is used for the verbose qfax status message; the stdout channel is used for the two information messages.
Connect at 9600 bps to xxxx xxxxxx (SomeLuckyPerson) Sending:0, connect time 40 secs, [xxxx xxxxxx] (SomeLuckyPerson)You may choose to supply either a stdout or stderr channel depending on the volume of messages required.
Addition information is given in section G.1.
There are then (at least) the following possibilities.
This facility is only available if you are using the Pointer Environment.
ex qfax;'-v -W 2 -P ram7_qfaxpoll_fax'In the example, qfax answers after two rings, will receive a fax if the caller sends one and will return the poll fax from the file ram7_qfaxpoll_fax if the caller makes a poll request.
qfax records the full path name of the last fax successfully received, in a file INDIR_QFAX-LastFax (INDIR being your top level inbound fax directory). The file just contains the full path name of the last received fax, terminated with LF (line feed). The qfv and printfax programs can easily access the last received fax.
ex qfax;'-m 3' (ex cview;'qfax -m 3') (even better) client 'QFAX' (send commands to qfax server) request 'QFAX','send jrh ram2_*_fax',a$ (tell qfax} to send) print a$ (read result from qfax) (qfax returns command result) (now qfax goes back to -m mode) (qfax receives some faxes here) ... request 'qfax','quit' (tell qfax to stop) freeclient 'qfax'The send command requires a phone number (or NAME/ALIAS) and a file. The poll command requires a phone number and optionally a file name if you wish to send as well.
send jrh ram2_f1_001 ram2_x_fax send 00-968-699407 ram1_test_g3 poll 699407 poll 699407 ram1_demo_faxWhen a suspend command has been issued, any commands other than resume, quit and exit are ignored.
CSM is a system extension to facilitate simple, cooperative, client server applications. CSM is free and freely distributable and available from the usual freeware sources.
Now move the pointer into the qfaxClient program.
Now, assuming you have an alias jrh set up and a fax file ram1_test_fax, hit F3 and type send jrh ram1_test_fax. qfax will start to send the fax, and when it's finished, a message will appear in the qfaxClient window to inform you. If a fax is received while qfaxClient is running, then you will also get a message.
You use all the qfax server commands (send, grab, suspend, resume, quit, exit) from the qfaxClient application.
Please note that qfaxClient is a simple, demonstration application. The `C' source code is available with the QFAX distribution. It is not a supported part of the QFAX suite.
given
QFAXINI = -p -l ram7_qfax_log -R -v -P ram7_poll_faxthen ex qfax is the same as:
ex qfax;'-p -l ram7_qfax_log -R -v -P ram7_poll_fax'and ex qfax;'-W 3' is the same as:
ex qfax;'-p -l ram7_qfax_log -v -W 3 -P ram7_poll_fax'The -W 3 argument on the command line overrides the contradictory -R in the QFAXINI definition. The -p option would be ignored in:
ex qfax;'-s jh ram2_test_fax'where jh is an alias and the full equivalent command might be:
ex qfax;'-l ram7_qfax_log -v -s 00-968-699407 ram2_test_fax'
qfv is a Pointer Environment (PE) viewer for QFAX format G3 files. qfv supports both 1-D and 2-D format files.
ex qfvor
ex qfv;'test_fax'
qfv allows you to specify a qfax_dat file from the command line, overriding QFAX_DATA. This option -C applies to all examples, but is not repeated below.
ex qfv;'-C myqfax_dat etc
There are two (disguised) buttons below the title bar. The first one is called MENU, the command key is F3.
The second one is the number after the MAG text. Key selection is M.
Here you can load a G3 format QFAX file (from text2g3 or qfax). When the fax is loaded the first screen-full is displayed in magnification '0' (i.e. 1/4 the actual pixel size), unless you have instructed qfv to use a different magnification. If you use MENU_REXT ©Jochen Merz, then the FILE_SELECT file requester is used. The default file extension for FILE_SELECT is taken from the qfax_dat SUFFIX value.
It is possible to load a fax at a specific page from within qfv, just add @page to the file name (either from the File Select 'F3' line or the qfv file requester prompt). For example, to load win1_faxin_multipage_fax at page 5, enter the name into the file requester as:
win1_faxin_multipage_fax@5
If your fax file is a part of a QFAX multi-page fax then, depending on where you are in the file qfv may offer options of Next Page and Prev Page.
The Info option displays information about the fax. The final number is the time in seconds the fax decoder took.
The Last Fax option causes qfv to load the last received fax (as defined by the QFAX-LastFax file).
The Invert option will flip a fax image if the fax has been transmitted upside down. This may be useful if you receive fax from the Antipodes.
qfv has a "Goto page" menu option.
The Files menu also offers Print, you must (obviously) have loaded a fax to be able to do this. You are prompted for output device and printer type. qfv supports HP PCL 3/4/5 (LaserJet II /III/IV, DeskJet), Epson 24 pin (and good emulations), Epson 9 pin and Postscript. On a slow system, be prepared for a long wait, particularly if you are using a serial printer and 24 pin or HP PCL; the output to the printer will typically be 300 - 400 Kb per A4 page, unless you have a modern HP printer that supports compression, in which case it will be around 35Kb.
The print options allow you to define specific printfax options (for example, to defined special printer options such as HP compression or sizing (-s 3)). and print either the current page, the whole fax or the rest of the fax.
qfv honours the printfax PFAXINI (see section 4.23) options as well as its own QFVINI options.
qfv print supports the same print page range format (via its "Print" menu option) as described for printfax.
When printing, a box appears with the legend Abort, Remove Cancel. If you hit abort or cancel, the printout is aborted. Remove merely removes the dialogue box, printing will continue. This box disappears (miraculously) when printing has finished.
The Review item will display a list of the recently received fax, assuming you have the QFAX Thing loaded. See section QFAX Thing F.1.
The other icon is Magnify. You can enter (single key, like Sysdef) the values 0,1 or 2.
Magnification 2 1 fax pixel = 1 screen pixel Magnification 1 2 fax pixels = 1 screen pixel Magnification 0 4 fax pixels = 1 screen pixel
You can navigate around using the scroll/pan bars or ALT and arrow key.
qfv also supports PE move, size and wake. Wake just redraws from the top left corner. You can size up to the maximum your hardware permits or full size (mag = 2), (2432x(a lot) pixels), which ever is smaller.
You can invoke some qfv actions from the keyboard.
Error trapping is minimal, if it cannot load a G3 file (i.e. not enough memory), it gives a message and then refuses.
Details of the way that qfv supports different page sizes are given in section 5.4.
If you have insufficient free memory to decode a complete fax page (or use the -X option), a requester will be displayed on reporting that the fax is being "banded" and the amount of extra memory required to decode a full page.
ex qfv;'[-X n][-m n] [-w xs] [-h ys] [-o dev] [-t name] [-p] [-q] [-b] [-g page] [-J|j jump] [-P eol] [-l | file_name]'
qfv honours the following printfax options from a PFAXINI option in qfax_dat.
HIT'ing resize works as a normal resize. DO'ing resize will toggle between making the display full screen, and reverting to the last none full-screen size.
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 and 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 5.1.
printfax also includes some pseudo devices such as PIC in full and half sizes and GIF.
ex printfax;'-C serial_printfax_dat etcThe 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
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).
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
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 may give better results than the HP option on better than 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
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.
printfax (and via PFAXINI, qfv) include a number of optimisations for HP LaserJet compatible printers (LJ II, III, IV, and Deskjets).
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.
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, V, 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.
|
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.
In addition to the QFAX software described in the manual, qfm requires the following software.
The qfm supplies two programs, qfm and qless.
qfm and qless are executable programs that should be installed on your executable path. qfm may be invoked by EXEC, EX or HOT_LOAD1 and a hot key.
qfm uses information in the qfax qfax_dat file. The extra keys used by qfm are described in section 10.2.4.
It displays the following menu:
The actions associated with each menu are configurable by the user, and a different action may be configured for left and right mouse button clicks.
Actions are defined by strings describing a program name and an optional command string. The command string may contain some special characters that allow further choice:
The special (internal) variables taken from qfax_dat are
Note: File names in a command only need want any of the above processing performed. A fixed name requires no special format.
The following section gives example command strings and effects:
qed win1_qfax_qfaxinfo_log | edit a file |
qed %f$QFAX_INDIR_txt |
$QFAX_INDIR is converted to the inbound directory, assume win1_qfax_in_; then File Select is invoked with a template win1_qfax_in__txt, i.e. with _txt as the extension and win1_qfax_in_ as the directory. |
qfax -v -s %t %f$QFAX_TEMP$QFAX_SUFFIX |
the %t launches qless as a chooser menu allowing you to choose a number from the phone book. Then the %f creates a filename template from the two special variables, $QFAX_TEMP and $QFAX_SUFFIX, using the qfax defaults of ram2_ and _fax, this would invoke File Select with a template of ram2__fax, to choose a fax to send. |
The default actions for the menu options are:
Edit Fax | qed %f$QFAX_INDIR_txt |
Make Fax | text2g3 %f |
View Fax | qfv -l |
Send Fax | qfax -v -s %t %f$QFAX_TEMP$QFAX_SUFFIX |
Print Fax | printfax %f |
Receive Fax | qfax -Rv |
Edit $QFAX_DATA | qed $QFAX_DATA |
Edit Phone Book | qed $QFAX_PHONE |
View Log | qless %? |
View Info | qless $QFAX_INFO |
You can change the actions of the LMB or RMB by some new keys in qfax_dat. The keys are:
Action | LMB Mnemonic | RMB Mnemonic |
Edit Fax | LMB_EDIT | RMB_EDIT |
Make Fax | LMB_MAKE | RMB_MAKE |
View Fax | LMB_VIEW | RMB_VIEW |
Send Fax | LMB_SEND | RMB_SEND |
Print Fax | LMB_PRINT | RMB_PRINT |
Receive Fax | LMB_RECEIVE | RMB_RECEIVE |
Edit $QFAX_DATA | LMB_EDDAT | RMB_EDDAT |
Edit Phone Book | LMB_EDPHONE | RMB_EDPHONE |
View Log | LMB_VLOG | RMB_VLOG |
View Info | LMB_VINFO | RMB_VINFO |
Where a specific RMB action is not defined in qfax_dat, then RMB assumes the LMB action (which will only be the default if the LMB key has not been defined).
Here are some qfax_dat examples:
LMB_EDIT = pe %f__txt LMB_PRINT = printfax -l LMB_EDDAT = pe $QFAX_DATA LMB_EDPHONE = pe $QFAX_PHONE LMB_VLOG = qless win1_qfax_qfax.log # And some extras on the RMB too # This one is useful if the number is not in the phone book. RMB_SEND = qfax -v -s %? %f$QFAX_TEMP$QFAX_SUFFIX RMB_VIEW = qfv %f$QFAX_INDIR$QFAX_SUFFIX RMB_PRINT = printfax %f$QFAX_INDIR$QFAX_SUFFIX RMB_VLOG = qless %? RMB_VINFO = qless $QFAX_INFO
Note that each time you invoke an action, qfax_dat is read, (hard disk recommended), so you can change actions or the phone book (and its contents) without having to restart qfm.
In the LMB_EDIT example, the __txt definition (ie __ as the first part of the template) causes the default directory to be assumed.
The QFAX-CSM item rather destroys this elegant methodology, as it requires some hard coding. If a qfax is running in an enviroment that means it is a CSM server, then the QFAX-CSM item is available, and clicking on it opens a requester allowing the user to send a CSM command to the running qfax.
The behaviour of the existing receive and send options are also changed if a QFAX server is detected; in this instance, these commands will attempt to issue QFAX commands via the QFAX server port rather than spawn a new qfax process.
QFAX-CSM users might find the following settings useful; start qfax with Receive/RMB, notice how the menu also notices the change. Now send a fax using Send/LMB. Nice ?. And quit qfax via QFAX-CSM/?MB and quit. Notice the menu changes again.
# And some extras for CSM (ab)users too LMB_RECEIVE = qfax -Rvx -X 20 RMB_RECEIVE = cview -250 qfax -v -W3
qless is a standalone viewer and single choice menu generator. When used to provide a menu (as qfm does internally for %t), the result of the selection is placed in the hot key stuffer buffer.
For the purposes of using qfm, just place qless on your executable path; if you want to know more about qless and how you can use it in your own programs, get the qfm source archive from http://www.bigfoot.com/~jrhudson.
qfm may usefully be assigned to a hotkey with HOT_LOAD1, and added to QASCADE menus using the HKEY action.
You can only concatenate internal variables, not environment variables. You can concatenate an internal variable followed by an environment variable, but not vice-versa.
You can't follow %f with %?, yet, alas.
qfm and qless require full path names for data files.
The following examples are provided:
The util subdirectory contains some QFAX utility programs. The majority of these programs have separate documentation files.
ex swapqfax;'infile outfile'The QFAX header is preserved. This program may be useful for identifying the correct bit order setting.
Program to convert HP pcl format files to QFAX G3 format or to pbm format to include in QFax G3 files using text2g3.
It is not possible to predict the storage requirement for an incoming fax, other than to say that short, low resolution faxes with a lot of white space take up much less room than long, complex, blacker, high resolution faxes. For example, a half page, low res, A4 text may need 10-20 Kb, while the infamous PostScript golfing lady at A4 high res requires around 125 Kb, and a G3 encoding of tiger.ps from the GhostScript distribution would require 286 Kb; this would generate a reception error on many standalone fax devices (wonder how I know that ?), presumably because they buffer pages in RAM, and don't have 286 Kb to spare. You must ensure that your reception media has enough free space for any unattended use (a 720 Kb flp_ disk will typically hold 12-15 A4 pages), and if you are using the VIA parameter, your intermediate device has plenty of free space (RAM).
QFAX should work on any fax modem that is EIA Class 2 or Class 2.0 compliant.
I have received the following information from Dave Woodman concerning Supra v.32bis Fax Modems.
superHermes provides a reliable serial mouse interface that works very well.
If you have a problem with this software, then contact me by email jrhudson@bigfoot.com , Usenet (maus.sys.ql.int) or BBS INTL.QL echo, fax, phone or letter.
The above list is in order of probability of getting a reply.
I will probably need the following information to investigate most problems:
I am grateful to Graham Goodwin, Wayne Weedon, Don Walterman, John Impellizzeri, Davide Santachiara, Ralf Reköndt, Dave Woodman, Phil Borman and Jim Gilmour and many others for providing the information that has made the development of QFAX possible.
QFAX has been influenced by some other fax programs including the Unix NetFax software by David M Siegel, efax by Ed Casas, and the Atari HackFax software by Helmut E Neumann. Without the generosity of these programmers making their work freely distributable, QFAX would not have been written.
If you are interested in developing freely distributable fax or QFAX compatible software and would like to use QFAX source code, please contact me with your requirements. The latest code will be made available without obligation.
If you are developing commercial (or shareware) software and would like to include QFAX code then you should contact me for licensing details.
Graham Goodwin has beta tested innumerable versions to, and often beyond, destruction; and has suggested many of the features in QFAX. Without Graham's enthusiasm for a Class 2 fax solution, this project would not have been completed.
Tony Firshman supplied FOC a ``developer's upgrade'' to Minerva, the Minerva manual, and a superHermes to play with. QFAX is enhanced by Minerva and superHermes.
The qfax_font is copyright ©ZyXEL Communications Corporation, it is the same font as provided with their PC `ZFax' utility. I am grateful to ZyXEL Corp. for their written permission to include this font with the QFAX system. I am also pleased to recommend their modems, QFAX is developed and tested using a ZyXEL U1496E+ modem.
QFAX is written using c68 `C', running as a cross-compiler under Linux.
The following programs are not part of the QFAX distribution, but maybe of interest.
>
2Mb ram.
I am intrigued by how many people might actually be using this software. On the basis of correspondence, the number seems to be about 25. If a fax is too much trouble (too expensive), then a post card (picture of where you live) would be nice. And if you're using Lester's LFAX for a Class One modem, send him a post card as well. If we feel we're wasting our time, we might not bother again. (Ok, you know I'm bluffing).
Thanks to Frits Hotsteenge and Malcolm Cooper for the postcards (so there are now two QFAX users!).
Jonathan Hudson,
Southampton,
Hampshire.
|
QFAX Assumes that your modem defaults to hardware handshake in fax mode. if you are not sure of this, set the qfax_dat init parameter to include:
INIT = AT&H3 (ZyXEL, your modem may be different).
Note you can over-ride all this with the MDM1 -- MDM4 qfax_dat parameters.
A considerable amount of testing has gone into various methods of receiving fax directly to disk (or via memory buffers) using floppy disks. While this is possible for a single page fax, the overhead of QDOS floppy disk I/O has resulted in the fax protocol timing out on multi-page faxes for every method that has been investigated.
The most likely outcome of direct reception to disk is that you will receive all the first page (but slowly, at the sender's expense), but the overhead of closing the file (flushing slave blocks) will mean that the modem's end of page or end of document handshake will timeout. A transmission error will be generated on the sender's machine, and they may decide to retransmit the fax, which is not only unnecessary, but if it is a long distance or international call, expensive for the sender, and if it happens too often, they may decide not to fax you again. This condition is identifiable by
The normal +FHNG parameter is 0. (+FHNG:0), any non-zero value indicates an error as described in the EIA Class 2 specification.
Reception to disk is a desirable feature, as it provides data security in the event of system or power failure. QFAX implements this using an optional automated backup system whereby faxes are initially received to a ram_ device, and once the end of document handshake has completed, the fax is copied to a disk. This mode of operation is invoked using the VIA parameter to describe an intermediate reception path in your qfax_dat file. qfax does not release the phone line (although the caller will have hung up), until the copy has completed.
You should use the VIA parameter if you are receiving to floppy disk or to a slow hard disk on a slow CPU (e.g. Miracle Hard Disk on 68008 CPU). See the VIA keyword, section 4.10.
Reception directly to hard disk should be entirely satisfactory using a fast disk.
A typical A4 fax page will occupy between 30-60K bytes. A Trump Card with 600 Kb free will allow you to receive a ten page fax using the VIA parameter, while on a Gold Card with With 1 Mb free, you could receive a 17 page fax without error. Once the fax has been received, the memory is freed as the data is copied to disk. Note that a blank 720 Kb disk can only hold 12 A4 pages (at 60 KB/page). If you expect to receive fax at significantly higher volume than this I would recommend that you invest in either a standalone fax machine or a fast CPU and large hard disk system.
If your fax modem supports the Class 2 AT+FPCTO parameter, setting AT+FPTO = 255 in the modem init string may allow reception to floppy disk.
Sending of fax may also be effected by floppy disk I/O. If you are sending a document and qfax is reporting reception of unexpected characters, then this is symptomatic of such problems. The sequence of received characters (during send) :
[2b] received while sending data (+) [46] received while sending data (F) [48] received while sending data (H) [4e] received while sending data (N) [47] received while sending data (G) [3a] received while sending data (:) [20] received while sending data ( ) [34] received while sending data (4) [33] received while sending data (3)is an error report from the modem, +FHNG: 43.
So, if you receive the [2b 46 48 4e 47 3a] sequence while sending, you probably have a data flow problem due to floppy disk delays.
This is a fundamental problem of the way QDOS I/O works; when the operating system is servicing the floppy disk it cannot also service the serial ports. For reliable fax operation, particularly at v.17/14400 bps) you must use a fast disk device.
For some users this means using a ram_ disk and VIA ram.
The header is described by the 'C' fragment.
typedef struct { long title; long version; short width; short page; short pagemax; unsigned char resolution; unsigned char coding; int stamp; char tsi[24]; int hint; long offset; char lsb; char dummy[11]; } QFAXHEADER; #define QFAXTITLE 'QFAX' #define QFAXVERS '0.07' #define QFAXHEADLEN sizeof(QFAXHEADER)
SPMquot
>"= 0.06 and lsb != 0, then the file is LSB
format. All pages are the same bit order.
The offset field holds offset from the beginning of file to an array of "page descriptors" that describe any fax pages in the file that differ in coding or resolution from that described by the file header. If all the pages in the file have the same coding and resolution then the offset value will be zero. The offset parameter is only valid for file version '0.07' and greater. The "page descriptors" will be after all valid T.4 fax data in the file and be followed by EOF.
A v0.07 file with a non-zero offset parameter might therefore appear as
Header high res, 1-D, offset != 0 Page 1 data high res, 1-D RTC Page 2 data high res, 2-D RTC Page 3 data low res, 1-D RTC Page 4 data high res, 1-D RTC Descriptor, page 2 (at file position = offset) Descriptor, page 3 EOF
The 'page descriptor' structure is described by the following 'C' fragment.
typedef struct { long offset; // Offset from start of file short pageno; // Page number short code; // Coding value (0/1) short res; // Resolution (0/1) short page; // Page length (0/1/2) } OFFREC;
The following should be carefully noted.
ch = FOP_IN(tfax_fax) GET #ch\12,maxp% CLOSE #ch PRINT "Number of pages in fax file : ";maxp%
The lsb field defines the bit order of the file. If the version is
SPMquot
>"= 0.06 and lsb != 0, then the file is LSB format, otherwise it
is MSB. All pages are the same bit order.
Prior to QFAX v2.7, the QFAX font comprised 16 horizontal by 28 vertical
pixels per character. Each character is thus defined by fifty six
consecutive bytes arranged in ascending address from top left to bottom
right.
where the starting address, (n, from the base of the font) is given for ASCII code X as X * 56. Thus the character 'A' (ASCII 65) is offset 3640 (65 * 56) bytes from the start of the font and the complete font is 14336 bytes.
Within each character 'cell', the leftmost pixel is represented by the most significant bit. The character 'A' (ASCII 65) is represented by the sequence of hex bytes:
Offset 3640 | V 00 00 00 00 01 80 07 e0 0f f0 1e 78 3c 3c 78 1e 70 0e 70 0e 70 0e 70 0e 70 0e 70 0e 70 0e 7f fe 7f fe 70 0e 70 0e 70 0e 70 0e 70 0e 70 0e 00 00 00 00 00 00 00 00 00 00 ^ | Offset 3695
New format QFAX fonts (v2.7 and greater) can be any reasonable size and may be proportional. These fonts have a header as follows.
typedef struct { char flag[8]; /* "QfaxFont" */ unchar xpix; /* Char width in pixels */ unchar ypix; /* Char height in pixels */ unchar first; /* ASCII value of first char */ unchar last; /* ASCII value of last char */ unchar top_l; /* Top margin */ unchar bot_l; /* Bottom margin */ unchar right; /* Right margin */ unchar mode; /* Mode, '\0' = mono, 'P' = proportional */ long fsize; /* Size of character bitmap (bytes) unchar font[1]; /* Bitmap data */ } QFONTHDR;
The rest of the data is the font bit map. This is organised as above, i.e. the leftmost pixel on screen occupies the leftmost (high bit) (0x80). The data is packed (i.e. no alignment to any byte boundary).
For proportional fonts, the xpix field is the average width, and a table describing the width of each character (1 byte per character) follows immediately after the font bitmap (for example, if the font has characters 32 through 127, then the proportional width table would be 96 bytes long.
|
There is an optional QFAX THING (you need to have loaded HOT_REXT on QDOS systems) that maintains a list of the full path name and time stamp for received fax. The number of entries is definable when the THING in loaded. The default list size is 20. Once the number of entries reaches the list size, old entries are replaced. qfv has a menu option 'Review' that displays the THING list (file name and time), a fax may be 'picked' from this list for display and print.
The THING list may be saved as a file and reloaded when the system is rebooted.
qfax will maintain the list for fax received without error. A workaround is provided that may add similar functionality for LFAX users without necessarily requiring a new version of LFAX.
ex qfaxthing;'load [ListSize] [SavedData]'
Running 'qfaxthing' with the command 'load' takes two optional arguments, the number of entries in the list table and an existing 'saved THING list' file to load the THING with data. If both arguments are given, they must be in the order specified.
examples:
ex qfaxthing;'load 40 flp2_arrivals_dat' :from saved file, 40 entries ex qfaxthing;'load 16' :blank, 16 entries ex qfaxthing;'load win1_inbound_dat' :from file, entries as file ex qfaxthing;'load' :blank, default (20) entriesThe QFAX THING is not recognised by ANY QFAX programs unless you have first run 'qfaxthing;"load"'. The QFAX THING should not be loaded when qfaxthing is run. The QFAX THING maybe 'preloaded' from your existing received fax files using the 'LoadNT' progra, see LoadNT, section F.5.1.
ex qfaxthing;'kill'
example:
ex qfaxthing;'save win1_inbound_dat'
SAVETHING = filenameWhere SAVETHING defines the name of the THING save file. If this entry is defined, then 'qfax' will save the THING data to the file every time the THING is updated (i.e. after a fax is received). If SAVETHING is not defined, then the THING is still updated but the data is not saved to a file.
Note that the 'qfaxthing' program does not use this qfax_dat key; this is to minimise the overhead when 'qfaxthing' is run as part of a BOOT file.
So, if in your BOOT file you have
ew qfaxthing;'load win1_faxdata_arrivals_dat' you may wish to define SAVETHING = win1_faxdata_arrivals_datin qfax_dat to ensure the latest inbound fax information survives a system crash or otherwise unexpected shutdown.
I am not aware of the degree of support (if any) for QFAX Thing in the LFAX transport program. The FLOG utility is provided to give access to the QFAX Thing if the transport program does not.
FLOG may be run as the 'RXJOB' by LFAX after a fax is received. When FLOG has updated the QFAX THING, it can save the QFAX THING data and then run an (optional) user defined command.
ex FLOG;'-f path [-s savefile] [user_command]' where path is the name of the received fax file savefile is the name of a THING save file rest of line is a user commandFor example:
Putting the following line in an LFAX_CGF file may update the QFAX THING and save the THING data before printing the fax. LFAX users should check the syntax with the LFAX manual, I do not have a copy of this.
RXJOB = FLOG JOBCMD = -swin1_faxdata_arrivals_dat%s-f%f%sprintfax%s-c9%s%fNote that the timestamp in the QFAX THING will be the time that FLOG is run, not the time when the fax was received, but for practical purposes should be close enough.
QFAX users will find FLOG'ing futile (and double entries in the THING).
Assuming that my inbound fax dir is flp2_ then
EW qfaxthing;'kill' : REM ensure noTHING exists EW loadNT;'flp2_' : REM Make the list (this will also search sub-dirs) EW qfaxthing;'save myfax_thg' : REM Save it EX qfaxview : REM View some THINGIf, for example, you have inbound fax in win1_infax_ (and sub-directories thereof), then:
EW loadNT;'win1_infax_'would be appropriate.
Note that this process may take some time if you have a large fax database. LoadNT displays the sub-directories found, your top twenty and some search statistics.
qfaxview displays the contents of a fax thing in a scrollable PTR window. HITing or DOing an entry will result in the file name being STUFFED in the hot key 'stuffer buffer'. The freeeware *BASIC extension "GetStuffed" may be used to return data from the STUFFER buffer to a user *BASIC program.
I have included an example, example_thg, of a saved thing. If you are curious to see who faxes me (and incidentally if this works, then):
EW qfaxthing;'kill' : REM ensure noTHING exists EW qfaxthing;'load example_thg' : REM Load it EW qfaxview : REM View some THING a$ = GetStuffed : REM stuffed data EW qfaxthing;'kill' : REM ensure noTHING exists
0 - Just returns +FCON for fax 1 - Returns CONNECT FAX then +FCON for fax and CONNECT speed for data
You should have set +FAA=1, some C2 modems will ONLY recognise FAX connects without this set (+FAA=1), ZyXEL will probably be OK regardless (C2 is *NOT* a standard).
For ZyXEL modems, setting S38.3=1 toggles a DCD option that makes this more reliable.
If you then use the modem for either specific FAX or data (dial out) connects, you must reset some of these parameters. In particular, if you then use QFAX directly, you must reset the +FAA parameter (=0), otherwise the modem will return CONNECT FAX before +FCON, which QFAX does not like. One way to do this is using the default QFAX (i.e. No MDMn commands in qfax_dat) commands, which will do the necessary resets (that's why they are the default), via ATZ.
If you then want to make a data dial out (a mailer for example), then you must reset +FCLASS. Again ATZ does this. When you go back into QBOX, you must restore Class 2 adaptive answer (+FCLASS=2 +FAA=1).
> == your commnds < == modem responses 1. Start QBOX > +FCLASS=2 > +FAA=1 2. Data call (inbound) < CONNECT 14400 etc 3. In bound fax call < CONNECT FAX QBOX forks QFAX < +FCON 4. Mailer outbound call > ATZ (or +FCLASS=0 at minimum) < CONNECT 9600 get/send mail packets > +FCLASS=2 > +FAA=1 5. Outbound fax call > ATZ ) > +FCLASS=2 ) done by QFAX defaults > +FAA=0 ) < +FCON Note no CONNECT FAX send fax > +FCLASS=2 +FAA=1 BBS initialisation again 6. Outbound data call (using QTPI/QeM etc) > ATZ (or +FCLASS=0) < CONNECT 12000 do data connect > +FCLASS=2 +FAA=1 BBS initialisation again
There is also a pre-dial string in the QSPHAYES modem command file that is sent when MAIL uses QSPHAYES. So you could put the AT+FCLASS=0 etc in there and avoid having a QSPHAYES for each program. After dialling and disconnecting, QBOX also re-initialises the modem with its INIT parameters so it gets put back into fax mode.
The default QTPI dial initialisation (ATZ) will reset data mode.
This manual is prepared using the LATEX typesetting system. This facilitates the production of typeset (*.dvi or Postscript) documents (using LATEX and dvips), hypertext (HTML) using latex2html and even ASCII documents using lynx -dump.
The QFAX Postscript document may be printed using ghostscript under QDOS. The PSUtils package for QDOS contains the pstops program to print the manual as a neat A5 booklet format.
This document was generated using the LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998)
Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html -no_subdir -split 0 -local_icons qfax.tex.
The translation was initiated by Jonathan Hudson on 1999-08-06