Faximum Logo®

Faximum ELS/PLUS Reference Manual

for SCO OpenServer 5 - Release 2.1 - HTML Edition - Draft 1

[Top] [Prev] [Next] [Bottom]

The Line Printer Intercept


Introduction

Faximum's line printer intercept makes it possible to "fax-enable" existing software applications easily. For example, using the line printer intercept you can link your existing accounting application to Faximum and automatically fax out your invoices-without having to write any code.

The line printer intercept to Faximum provides a very simple and straightforward mechanism for sending faxes automatically. All that is necessary is that the document to be faxed (letter, invoice, etc.) contain within it the information Faximum needs to prepare the fax.

In the simplest case, just the fax number. For example, including the string //FAX(fax=1 604 926 8182) somewhere in the document is enough. The document is then sent to the standard UNIX spooler (using the lp command and specifying the fax pseudo-printer): lp -dfax < document.

Faximum extracts the fax number and other information (such as the business form to use as an overlay as well as the priority of the fax) from the //FAX parameter list and then removes the //FAX lines so they do not appear on the faxed document. The faxes are then prepared and sent just like any other fax request.

Not only can the line printer intercept take single documents, it can automatically process single print files which contain faxes to multiple destinations. It can handle an entire invoice run, with hundreds of invoices, and correctly deliver each invoice to the appropriate fax machine.

In many cases, your accounting system can be easily set up to include the necessary information in the print files and to send it to the fax printer. You can also use this mechanism through your word processing package (WordPerfect, Word, or other) to send faxes from your WP program. You can even broadcast faxes using the mail merge features of your existing word processing software!

The line printer intercept can also handle overlays so that the fax can appear as if printed on an invoice, purchase order, letterhead, or other pre-printed business form.

Overview

The line printer intercept operates by examining the information sent to the fax pseudo-printer1 looking for the sequence //FAX(. The line printer intercept then extracts the parameters that follow and uses the information to prepare the fax.

For example, one could fax a letter to someone by preparing the following file:

//FAX(fax=1 602 926 8182;style=Company Letterhead)

14 December 1992

Dear Sirs:

.....

And then by sending this file to the fax pseudo-printer:

lp -dfax < file

Note that the line //FAX(fax....) is removed by Faximum before the fax is prepared and therefore does not appear on the fax itself.

The figures show a more advanced example. Figure 1 represents a typical print file generated by an accounting application. Figure 2 shows an image of a typical invoice form. Figure 3 illustrates the resulting fax generated by the line printer intercept by processing the data from Figure 1 and merging it with the overlay shown in Figure 2.

As we will see below, there are a number of parameters that can be set in order to tell Faximum exactly how to prepare the fax. In addition, defaults can be set up so that commonly used parameters need not be specified each time. Indeed, one can have multiple fax pseudo-printers, each with its own set of parameters. For example, the fax_invoice pseudo-printer could be set up to overlay the invoice form automatically, while fax_letter could be set up to use letterhead.

As many //FAX lines may be included as necessary to provide all of the parameters to Faximum. Since there is no limit on the length of a line, it is also possible to specify all of the parameters on a very long line. Many parameters will be set by default if not specified so that it is not necessary to include every parameter.

Note, however, that all of the //FAX lines related to a single fax must appear on the same page. If the line printer detects a page break (i.e. a formfeed or CTRL-L character) and then sees a line containing //FAX, it will assume that this is the first page of a new fax to a different destination.

The //FAX sequence need not be on the first line of the fax, nor need it be the only thing on the line.

Fax Parameters

The general format of a line printer fax command line is:

//FAX(parameter;parameter;parameter...)

There is no limit to the number of parameters permitted on a single fax command line nor is there a limit on the number of fax command lines that may be present. The closing parenthesis of the fax command line must appear on the same line as the opening sequence //FAX(. If more than one fax command line is present, they must all appear on the same page. Parameters must be separated by a semi-colon and the last parameter terminated by a closing parenthesis. If it is necessary to include a semi-colon or closing parenthesis in the string defining the value for a parameter, then they must be escaped using a back-slash (`\'). For example:

//FAX(message=Invoices\; Statements\; and other stuff)

Matched or escaped parentheses may be used within parameters strings. For example:

//FAX(message=Look at (this) or try \) a right paren)

Finally, quotation marks (single or double) may be used to escape the entire contents of the parameters string:

//FAX(message="Anything goes including ;) characters")

The following parameter names may be specified in either upper or lower case.

fax The fax number.
If intelligent dialling is enabled and this number does not consist of four components, then the default country code and area code will be added automatically.

file The name of a file to be attached to the end of the fax. The line printer intercept will determine the type of the file based on an examination of the first several characters of the file. Up to four files may be attached by specifying the parameters file.1, file.2, etc.

from The information about the sender to include on the cover sheet (if a cover sheet is to be generated according to the style specified). If this information is missing then the from information on the cover sheet will remain blank. This field may specify a single value, or may provide up to three sub-fields: from.name, from.title, and from.dept.

mailaddr The name of the user to whom mail is to be sent if the request is unsuccessful.
By default, mail will be sent to the user who ran the line printer spooler command.

message The text of a short message to be placed on the cover sheet. For example:

//FAX(fax=555 1212)

//FAX(message=Confirmation of Verbal Order)

Alternatively, a text file containing the coversheet message that is readable by all (i.e. r permission for everyone) may be referenced using the messagefile parameter. For example:

//FAX(fax=555 1212;messagefile=/u/ar/msg/dunning)

print Specifies that the fax ought to be sent to the printer before being transmitted. It is possible to specify any or all of the cover sheet (COVER), attachments (FILES or ATTACHMENTS), or confirmation (CONFIRM). The case of the keywords is not important. For example, print = Cover + Confirm.

The confirmation print-out consists of a reduced-size image of the first page of the fax along with information confirming the successful transmission of the fax.

To support previous software, the values No and Yes are also supported (yes is equivalent to Cover + Files).

If more than one destination has been specified, only the cover sheet and attachments for the first destination will be printed (confirmations, if requested, will be printed for each destination). If yes, then the printer parameter (below) must be specified. Optional (default is no).

printer The name of the printer (from the printer database) to use to print the fax (the printer database specifies the command to use to access a printer on your UNIX system). Required if the print parameter (above) is set to yes.

subject The text of the subject line to be placed on the cover sheet (if a cover sheet is to be generated according to the style specified).
If this information is missing then the subject information on the cover sheet will remain blank.

time The earliest time (and date) this fax ought to be sent. This parameter can be specified using standard English notation.

For example, the date can be specified as <day> <month> or <month> <day> where <month> is one of Jan, Feb...Dec. and <day> is a number from 1 to 31. For example:

28 Feb

Apr 18

If you wish to specify the date using the (ambiguous) numeric notation (i.e. 3/7 or 7/3/93) then the system will assume that the components are in the order specified by the Data Format Order parameter (i.e. "dmy"), in the system configuration. Any of slash (`/'), hyphen (`-'), or period (`.') may be used to punctuate the components of the date.

The time can be specified either using a 24-hour clock (i.e. as a number followed by `h', or a number using a colon separating the hours from the minutes) or using a 12-hour clock (i.e. as a number using a colon separating the hours from the minutes, followed by `a.m.' or `p.m.'). For example:

2300h

1:30pm

17:30

Time and date specifications can be combined in any order. For example:

00:00 1 Jan

1 Jan 1am

Finally, certain words are understood such as "midnight", "noon", "tomorrow". Certain noise words can be employed to make things easier to read (including "at", "on", "the"). For example:

midnight

tomorrow at midnight

noon on the 15th

3pm on Oct 3rd

to The addressing information to place on the cover sheet (if a cover sheet is to be generated according to the style specified). If this information is missing then the to information on the cover sheet (if present) will remain blank. This field may specify a single value, or may provide up to four sub-fields: to.name, to.title, to.dept, and to.company. For example:

//FAX(to.name=John Doe;to.dept=Accounting)

//FAX(to.company=ACME Concrete)

The following three parameters are related to the database that control the operation of Faximum. More information on these databases may be found in Chapter 2 of the Faximum Reference Manual.

account The account the fax is to be charged to.*

class The class of service to be used.
The class of service specifies various scheduling parameters that affect when the fax will be sent (and if long distance, how much it will cost). *

style The style of the fax to be used.
The style of a fax specifies various parameters that affect the appearance of the fax. Included are such things as: the design and layout of the cover sheet; the resolution and page length; and the form overlay (if any) to use. *

* If these fields are blank then a default value will be used if the fax is submitted through the UNIX line printer spooler. If, however, you are using the Line Printer Intercept through a word processing program such as Word Pefect, then you must specify values for each of these three parameters as no defaults are available. Note also that the account and class parameters are only available with Faximum PLUS.

//FAX versus //-FAX

As mentioned earlier in this document (and illustrated in Figure 3), the Faximum line printer intercept strips out the //FAX sequence and following parameters so they do not appear on the fax. An obvious question is what effect this has on the alignment of the other printed information.

If the parameters information is introduced with //FAX, then each character of the //FAX sequence along with the following parameters will be replaced with a space character and the new-line at the end of the line will be kept. This means that the position of other information on the page (including information on the same line as the //FAX sequence) will be the same as if the document were printed with the //FAX sequence.

In some cases this is not what is desired. In certain circumstances it is desirable to add the //FAX sequence as a new line before the body of the (say) invoice and have the entire //FAX line, including the new-line character, removed. If this behaviour is desired, then (a) use the sequence //-FAX instead of //FAX, and (b) start the //-FAX sequence in column one and do not include any non-blank characters after the closing `)'.

In general, //FAX ought to be used with programs such as word processing programs where the line containing //FAX is counted by the application as one of the printed lines. For applications in which the line containing the //-FAX is extra and not counted when determining page breaks etc., then the //-FAX form ought to be used.

Form Alignment

One of the problems that will probably have to be addressed when setting up the line printer intercept to print, (say) invoices, is the alignment of the data on the form. The positioning of the data on the form can be changed by varying the top and left margins as well as changing the horizontal and vertical spacing (i.e. the character per inch horizontally and the line per inch vertically).

This can be done either by inserting the appropriate HP PCL control sequence before each page of data as it is printed, or by modifying the line printer interface script itself.

The advantage of modifying the line printer interface script is that the application itself does not have to be changed. The disadvantage is that should you be using more than one type of form it will probably be necessary to define a different line printer interface for each form since the alignment of each form will differ (and the interface script will be tuned for one type of form only).

Should you decide to edit the line printer interface script, complete instructions may be found in the comments to the script itself. Once the line printer interface has been installed (see below), look in the directory
/usr/spool/lp/admins/lp/interfaces for a file with the name you chose during installation for the line printer intercept pseudo-printer.

Should you decide to include the control sequences in your printed output, the sequences to use include (where \E represents the ESC character and # any decimal number):

\E&l#C height of each row of print (where # is in units of 1/48 in.)

\E&k#H width of each column of print (where # is in 1/120 in. units)

\E&l#F number of lines on each page before jumping to a new page

\E&a#P page orientation (0=portrait, 90=landscape...)

\E&a#L left margin (where # is the column number)

\E&l#E top margin (where # is the line number)

More information on available PCL sequences may be found in your HP LaserJet printer manual.

Defaults

Should you be using one or a small number of forms with the line printer intercept, you can edit the line printer interface script (see the file /usr/spool/lp/admins/lp/interfaces/fax on UNIX systems or the file /usr/spool/lp/interface/fax on SCO XENIX systems) to define defaults to use in the event that your print file does not explicitly define certain parameters. The three parameters that can be set by default are the account, class, and style parameters. See the comments in the line printer interface script for more information.

Note that default values are not available when using the line printer intercept through WordPerfect.

Overlays

The overlays (i.e. images of pre-printed forms) can be prepared in a number of ways. First, one can either scan in an existing form or, if a scanner is not available, fax it to your Faximum system. The overlay can also be prepared using a forms or desk-top publishing package that produces PCL or PostScript output.

While scanning (or faxing) an existing form is the easiest method, the quality of the overlay image will be lower than if produced by a DTP system and converted directly into TIFF format. The sample form in Figure 2 was produced using FrameMaker.

If the form is faxed in, the tiffcut utility can be used to remove the top-of-page banner that may appear on the top of the received fax. For example, to remove the top half-inch from a TIFF file use:

/usr/fax/bin/tiffcut -x 0.5i -o form.tif inbox-254

If the form has been produced using a DTP package (such as FrameMaker), the PostScript file can be converted into TIFF format by using the appropriate conversion script:

/usr/fax/convert/ps -o form.tif form.ps

This assumes that you have purchased and installed the PostScript emulator option for Faximum.

Should your DTP package produce PCL output (instead of PostScript), use the /usr/fax/convert/pcl instead in the example above.

Once the overlay TIFF file has been created, it needs to be moved to a known directory (/usr/fax/coversheet is recommended) and then referenced in a new style. Chapter 8 of the Reference Manual discusses how to create new entries in system databases and Chapter 2 contains information on the style database in particular.

Installation

Installing the line printer intercept to Faximum requires that you create a new line printer destination for your UNIX line printer spooler and then adjust it to point to Faximum rather than to a real physical printer.

The detailed instructions on how to do this may be found in the Installation Guide and Release Notes in the section titled Line Printer Intercept.

Word Processors

The line printer intercept for Faximum is not limited to faxing invoices and other financial documents from accounting applications. It can also be used for sending faxes directly from your word processing program. Indeed, you can use the mail merge facility from within your word processing program to broadcast to multiple destinations.

NOTE that the ability to access the line printer intercept through your word processor is different and in addition to the fax macro provided for WordPerfect and Microsoft Word.

To differentiate between the two mechanisms:

The advantage of the fax macro is that you do not need to make any changes to the document since the addressing information (the fax number etc.) is entered separately. The advantage of the line printer intercept is that it can extract the addressing information (i.e. the fax number etc.) from the documents

Current Limitations

The current implementation of the line printer intercept will only work with ASCII and PCL files (not PostScript).



[Top] [Prev] [Next] [Bottom]

1 The term pseudo-printer is used to distinguish this interface from line printer destinations that represent actual physical printers. Although the line printer destination name fax is used in these examples, the system administrator can use any name that does not conflict with the names of existing printers (actual or "pseudo").

support@Faximum.com
Copyright © 1996, Faximum Software Inc. All rights reserved.