Print/Fax Style

Faxing

Here is the good news--once you've implemented printing, you have already implemented faxing as well. There are just a few things to watch out for.

Faxing requires careful attention because of the very real possibility of timing out during the middle of a fax. Thus, it is imperative that the actual sending of a fax be speedy. Fax machines will time out when about five seconds elapse without receiving information. Thus, once the connection has been made, everything must proceed at a fairly brisk pace. Further, each band must image quickly because all imaging occurs while the fax connection exists. As a result, you will need to do the following:

These considerations are especially necessary if you have complicated pages to fax. For many applications, however, all that is required is some testing that demonstrates that faxing does not time out.

If you have some lengthy process that you need to carry out before the fax connection is made (perhaps you need to calculate p to 1000 decimal places), override the FormatInitScript. This message is sent to a protoPrintFormat before any fax connection has been made.

Fax cover pages provide a count of the number of faxed pages. If you can easily calculate the number of pages in a fax, override the protoPrintFormat method CountPages. The default version of this instantiates the protoPrintFormat and repetitively calls the PrintNextPageScript. This will always be correct, but by overriding CountPages you may be able to do it quicker (imagine a protoPrintFormat which knows it has 1500 lines to print at 60 lines per page--simple arithmetic yields the number of pages).


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996