views:

903

answers:

2

Is there a way to convert a HTML string into a Image .tiff file?

I am using C# .NET 3.5. The requirement is to give the user an option to fact a confirmation. The confirmation is created with XML and a XSLT typically it is e-mailed.

Is there a way I can take the HTML string generated by the transformation HTML string and convert that to a .tiff or any image that can be faxed?

3rd party software is allowed, however the cheaper the better.

We are using a 3rd party fax library, that will only accept .tiff images, but if I can get the HTML to be any image I can covert it into a .tiff.

+1  A: 

A starting point might be the software of WebSuperGoo, which provide rich image editing products, cheap or for free.

I know for sure their PDF Writer can do basic HTML (http://www.websupergoo.com/helppdf6net/source/3-concepts/b-htmlstyles.htm). This should not be too hard to convert to TIFF.

This does not include the full HTML subset or CSS. That might require using Microsofts IE ActiveX component.

Kamiel Wanrooij
The HTML has all the styling in on each element. That is because if you view it in Outlook on preview and I had css styling at the top you would see the styling. So I put them all on the elements to prevent that.
David Basarab
+2  A: 

Here are some free-as-in-beer possibilities:

You can use the PDFCreator printer driver that comes with ghostscript and print directly to a TIFF file or many other formats.

If you have MSOffice installed, the Microsoft Office Document Image Writer will produce a file you can convert to other formats.

But in general, your best bet is to print to a driver that will produce and image file of some kind or a windows meta-file format (.wmf) file.

Is there some reason why you can't just print-to-fax? Does the third-party software not support a printer driver? That's unusual these days.

Thomas Kammeyer
I am not sure if it does, I will check into that. That may be the solution I need.
David Basarab