FaxMan SDK Version 4.7
Using the FaxMan Printer Driver

Printer Driver Overview

The FaxMan printer driver allows your application to capture the printed output of any windows application into a faxable tiff file. FaxMan includes printer drivers for Windows 95/98/ME, Windows NT 4, Windows XP, Windows 2000 and Windows 2003. The FaxMan print control automatically handles installing the appropriate printer driver for the host operating system.

 

When an application prints to the FaxMan printer driver it will create a fax file in the fax file directory associated with the driver and then fire a PrintComplete event in the print control. If your FaxMan enabled application isn't running when the application prints, then the printer driver will start up its associated application and fire the event again.  In the PrintComplete event handler the application can call the GetNextJob method to get a PrintJob object which contains details of the print job. Most applications will then create a Fax object, add the newly created fax file to its Files collection and then send the fax using the SendFax method.

 

Installing the Printer Driver

The FaxMan printer driver can be installed in two ways. First the application can call the InstallPrinter method of the FaxPrint component to install the printer. Alternatively the faxinstall.bat file can be used to install a printer in an application's install program.

 

Installing the Printer Driver using the Install method

After creating an instance of the print component the application can set the PrinterName property to the name of its associated printer or use the default printer name which uses the format "YourApp Fax Printer". The name is the link between the printer driver and its associated FaxMan enabled application. The name should be unique to your application and is the name that will be displayed in the list of Windows printers.

 

The PrintFilesPath property can be set prior to installing the driver to specify the directory in which print jobs should be placed. The directory can also be changed manually in the Fax properties page of the printer properties dialog.

 

Applications can programmatically determine if their printer driver is installed by using the IsPrinterInstalled property. If IsPrinterInstalled returns false then the driver hasn't been installed and by calling the InstallPrinter method the application can install the driver. The InstallPrinter method takes a parameter which is the path to the executable to start when an application prints to the driver and the associated application isn't running.

 

Installing the Printer Driver using Faxinstall

The faxinstall.bat batch file can be called from an installer to install a FaxMan printer driver. The batch file takes two command line parameters, the first is the full path to the associated executable and the second is the name of the printer driver. If either parameter contains spaces be sure to wrap the value in quotation marks.

 

The Faxinstall.bat file requires the fmprint4.ocx to be located in the same directory as the faxinstall.bat file.

 

 

 


© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.