Page 1 of 1

this method is working bt not right

Posted: Mon Apr 17, 2006 10:29 am
by siddharth jain
hi
i m using this code to open html doc

{
struct stat statbuf;
char *str;

TFileStream *file = new TFileStream("****",fmOpenRead);
stat("****",&statbuf);

str= new char[statbuf.st_size-1];
file->ReadBuffer((void *)str,statbuf.st_size-1);

RvHtmlImporter1->BasePath="c:\\";
RvHtmlImporter1->LoadHtml(str);
RichViewEdit1->Format();
}

bt something is wrong there because it is not detecting even
<h2 align="center>xxxx</h>
what should i do
can't we download websites in TRichView by use of HtmlImporter directly

Posted: Thu Apr 20, 2006 7:53 pm
by Sergey Tkachenko
Well, RvHtmlImport is not perfect. It looks like it does not support align attribute in H1, H2, etc. tags. It does not support CSS, scripts and forms.
May be you can consider using some another HTML parser, but it will require some amount of work.
Additional info: http://www.trichview.com/forums/viewtopic.php?t=359