Sending a Fax (sourcecode wanted) 
Author Message
 Sending a Fax (sourcecode wanted)

Hello All,

I would like to send a fax from my own program. I don't want to use external
programs because they don't satisfy my simple needs.

So, is there anybody who knows sourcecode to send a bitmap as a fax ?

Thanks in advance.

Greetings Daan.



Fri, 12 Dec 1997 03:00:00 GMT  
 Sending a Fax (sourcecode wanted)
I wish I had found such source code years ago, it would have saved a lot
of late nights.  The problem with your simple request is that it is not
necessarily simple.  

What you must do is convert your bitmap to a CCITT G3 file.  This is a
modified huffman file, which basically assigns dot pattern sequences to a
bit pattern according to the frequency of occurrance.  This was
determined a long time ago based on standard text transmission - so fancy
fonts and graphics don't count when it comes to "frequent" - the bit
sequences are generally more complex.  However, it is a straightforward
conversion, and the G3 tables are published plenty of places - the formal
place is one the CCITT Blue Books (I forget which volume offhand); but
I've also seen excerpts in files on the net (G3FAX.ZIP or something).  
BTW, take this same code and make it adjust for pattern frequency on the
fly (assigning most frequent patterns to shorter code patterns), and
you've got the conceptual basis of V.42bis.

Most class 1 and class 2 pc fax software store received or sent faxes as
G3 files encapsulated with a TIFF header; which adds the number of dots
per line and scan rows.  Normal US faxes are always 1728 dots per row.  
The number of scan lines is determined by A) standard (100 rows per inch)
or fine (200 rows per inch) resolution; and B) the length of the fax (in
the US it is normally letter size, and A4 in Europe).

Then you must provide the appropriate AT+CLASS (fax) commands to your
modems - if your modem is class 1, you have to do more work; class 2
modems make it a little easier.  If you have a CAS modem, then will
probably need to provide the cas driver a pcx file, and write interrupt
2F calls to submit the fax.

Once the modem connection is established, you must still transmit the
file and negotiate termination of transmission.

This is a very simplified version, but there is a fair amount to it.  May
I suggest a couple of alternatives to you developing your own code.

1) There are a number of graphics libraries that offer TIFF Group 3 as a
conversion format.  So you could save your bitmap, call the library
conversion and out pops a TIFF G3.  It also seems that I've seen one or
two libraries which provide fax support for inclusion either as DLL's or
as libs.  I would check The Programmer's Shop or one of those types for
such a library.  The problem with these libraries is they most often add
unwanted overhead to your apps.

2) If you have text data to fax, you could consider an ASCII fax modem.  
There are a couple; USR has an inexpensive one; and our company's modems
(Vidicode) also provide ASCII fax support for any type of computer with
CLASS 1/2/CAS, dos/windows/win95/nt/os2 and ASII on standalone pc's or
LANs or mainframes, from 1 to 250 lines fax/voice/data/bbs (sorry,
couldn't help it) - but it is not a $50 modem.

3) I'm not sure about other third party software, but our company
provides DDE hooks to our fax driver to allow submission of faxes by any
application.  For example, you could have an SQL query with graphics
involved that your application stores in (for example) RTF format, that
you can, through DDE calls, tag it as a Word app, and the fax driver will
automatically process and submit the fax using the information provided
through DDE. With our stuff, it is primarily LAN based, but works equally
well on a standalone.

I think that some of the other packages also provide this function - but
you will probably have to ask about it - it is not something I've seen
advertised.  We don't usually mention it because it tends to scare some
customers away when you start talking DDE and programming.

4) Check out MAPI to see what service you can use to accomplish your
needs.

Good luck.

-jde



Thu, 18 Dec 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MAPI to Send FAX Example

2. Sending a fax from inside TP7 (Class 1 Support)

3. Send fax for using Turbo Pascal (Dos Version)

4. sending and receiving FAX?

5. Sending fax within Delphi 2.0

6. sending and recieving FAX

7. Wanted: sourcecode for an editor (BP7, OO)

8. Send 20 FREE Pages of Fax to any Fax machines in the World!

9. Send 20 FREE Pages of Fax to any Fax machines in the World!

10. Send 20 FREE Pages of Fax to any Fax machines in the World!

11. Automaticaly Faxing reports with MS Fax

12. complete sourcecode available

 

 
Powered by phpBB® Forum Software