Saturday, January 07, 2006

Alternate to PDF

Most of the time our client wants report to be light weight and easily opened. If we use PDF, it needs Abode Reader to open PDF documents. So to over come this problem, here is the solution, MHTML. MHTML files store images and text in single file as MS Word does. To Open MHTML files, you need Internet explorer or MS Word 2000 and above.

How to create MHTML?
Easy, Just pass the URL to this method


public static bool SaveWebPageToMHTFile( string url, string filePath)
{
bool result=false;
CDO.Message msg = new CDO.MessageClass();
ADODB.Stream stm=null ;
try
{
msg.MimeFormatted =true;
msg.CreateMHTMLBody(url,CDO.CdoMHTMLFlags.cdoSuppressNone, "" ,"" );
stm = msg.GetStream();
stm.SaveToFile(filePath,ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
msg=null;
stm.Close();
result=true;
}
catch
{throw;}
finally
{
//cleanup here
}return result

Sunday, January 01, 2006

Free Modeling tool

Gentleware has come up with a Free Modeling tool called poseidon. The comunity edition is free downloadable and with full functionality. It needs JRE 1.4 or higher. As it is developed in Java it is platform independent.

For more information:
www.gentleware.com