Thursday, April 10, 2008

How to Fax using .Net - HTML to TIFF

I had to build a fax soltution for one of my application. So again as usual, I started my research by searching on the net. Another collegue of my mine suggested using microsoft fax server. We were also using a third party software for "Interactive voice response" requirement from pronexus and this software also had faxing capabilities. So I narrowed down on these 2 application. Now my issues started.

I had fax information that I was reading from my database. The information had to be formatted. So I thought of faxing HTML documents. That is when I realised that Fax expects images or text files as the source document. The image has to be in TIFF format and it has to have specific encoding. I started with microsoft fax server, and the encoding requirements for this server is not very strict and it kind of accepts all types of TIFF images. But our requirement was to be able send multiple faxes at the same time (through multiple phone lines) and be able to process them in parallel. So this meant using multiple modems or getting a hardware which behaves as a modem for fax server. I was not too sure about this implementation and so I moved to VBFax (from pronexus)

We had already purchased dialogic boards for the IVR solution and I wanted to use this same boards to fax. The development board had 4 ports and in production we will be having a sigle bpard with 48 ports so that we can processes 48 requests in parallel. Now that I had narrowed down my hardware, the issue in hand was how to convert HTMl to TIFF format

There are lots of solutions available for this. But all of them is implemeted as printers i.e. you install it as a printer and you fire a print command (using code or any application File->print menu) and select this printer and it converts the currently opened file into TIFF. I was not too happy with this solutions because HTML files by default are opened by IE (or any browser) and when you print a opened document, it shows the print dialogbox. Now this has to be implemented as server and there cannot a user sitting and hitting the "ok" button. So how to avoid this print dialog. By the way, this was another reason why I moved away from Microsoft Fax server because its fax client also gets installed a printer. So again more reasearch and I found some other solutions like the ones from black ice software (http://www.blackice.com/), Informatik Image Driver 3.50 (http://www.informatik.com/), Zan image printer (http://www.zan1011.com/) and lots of others .. Some even like the one from back ice had .Net support which I needed. But it costs around $2000 .. what???? yes, too expensive

Luckily I found another software which converts HTML strings to TIFF.This was eactly what I wanted. So now I could just read the database and create a TIFF file directly. No need to create the HTML file and send it to the "Image" printers which would have been an expensive (with respect to time) affair .. This software was from Guangmingsoft called "HTMLSnapshot". I did have to talk a lot with their support to get the created TIFF iamge to work with my dialogic boards. Their support (David) was very helpful too. I finally have managed to get it working and hopefully everything works smoothly .. Its still under development .. I will update as we proceed ..

No comments:

Post a Comment