FaxMan Jr
Sending Faxes

Sending a fax involves creating an instance of the Fax class and setting the desired properties in that object then calling the Send method of the Faxing object to start sending the fax.


The Fax object contains all the information about the fax including the files to sent, coverpage information such as Sender's Name, Recipients Name, etc.


Faxes can consist of only a coverpage or of one or more fax files optionally including a cover page.  Either the CoverPage or FaxFiles properties must be set to valid values prior to sending the fax. FaxMan Jr supports cover pages in our own .PG format and the .CPE Windows 9x Cover page format. Fax files must be converted to the FaxMan Jr FMF file format prior to sending. This file format is basically a multi page Group3 compressed TIFF file which has been written with certain TIFF tags. Tiff files created by other applications will generally need to be imported using the ImportFiles method to be sure they are written with the proper parameters. It is possible to write a tiff file from another application so its directly faxable but it requires the file be written with a strict set of tiff tags.


The minimum Fax object properties required to send a fax are:



The minimum Faxing object properties that must be set are:


Once the appropriate properties have been set the fax can be sent by calling the Send method of the Faxing class and passing the Fax object.


Control will return to your application after calling Send and the fax will be sent in a background thread. While the fax is being sent the Faxing class will fire several events indicating the progress of the fax being sent. Your application can expect to receive the following events:


Each of these events includes a FaxEventArgs object passed to the event handler, this object contains a Fax object containing the latest status of the fax.


Once the FaxCompletionStatus event has fired your application can use the Faxing object to send or receive another fax. Calling the Send, Receive or Listen methods while the control is still busy sending a fax will cause an exception to ge generated.


Send A Coverpage in C#

Faxing faxman = new Faxing();

Fax fx = new Fax();

fx.FaxNumber = "1234";

fx.Coverpage = @"c:\cover1.pg";

fx.Comments = "This is my first fax";

faxman.Modem = new Modem(3, FaxClass.Class20); // Use COMM3 and Class 2.0

faxman.Send( fx );


Send A Coverpage in VB.Net

Dim faxman As Faxing = New Faxing()
Dim fx As Fax = New Fax()

fx.FaxNumber = "1234"
fx.Coverpage = "c:\cover1.pg"
fx.Comments = "This is my first fax"

faxman.Modem = New Modem(3, FaxClass.Class20) ' Use COMM3 and Class 2.0


See Also



© 2014 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.