Page 1 of 1

CSS in RvHtmlImporter

Posted: Thu Nov 17, 2005 12:27 pm
by andrew
Does RvHtmlImporter take in account CSS styles - internal or external? Doesn't seem to in the actiontest demo, but is this a limitation of the component or the demo?

Anyone extended RvHtmlImporter to deal with CSS styles?

Posted: Thu Nov 17, 2005 7:02 pm
by Sergey Tkachenko
This is a limitation of TrvHtmlImporter

Posted: Fri Feb 17, 2006 8:46 pm
by eddiev
Please can somebody tell me what can i do to parse the css or what vcl component can i use with RvHtmlImporter and RichView to read the css? or thats imposible..

Regards.

:o

Posted: Sat Feb 18, 2006 5:30 pm
by Sergey Tkachenko
First, the last version of the RVHtmlImporter understands CSS saved by TRichView.SaveHTMLEx.

If you need to load arbitrary CSS, you need a thirdparty HTML parser capable to read CSS. For example, I believe, a commercial version of pbear.com components has such parser, and it can be used to read in trichview (not a simple plug&play, of course, a code filling trichview from the parser results is required)

Posted: Mon Feb 20, 2006 3:52 pm
by eddiev
Thanks for your answer, but can you put an example of how can i import HTML with css. Please this is very important to my soft and i need it to finish it.

Regards.

Posted: Mon Feb 20, 2006 7:24 pm
by Sergey Tkachenko
Do you mean importing HTML with arbitrary CSS, using thirdparty parser?
I have a code sample which was sent to me by one TRichView user. It uses PBear.com's parser to load HTML+CSS in TRichView.
PBear's parser is not free, it is a part of their HTML rendering engine.

Posted: Tue Feb 21, 2006 9:02 am
by hruslan2000
There has a free version: ThtmlLite HTML Viewer Component. It may be useful.

And here: http://www.torry.net/pages.php?id=216 has a lot of free html parsers.

Maybe somebody make an example for reading htms with css?

Posted: Tue Feb 21, 2006 1:31 pm
by eddiev
:D Thanks for the answer and a example will be perfect!. I'll be waiting for the example :cry: .

Regards.

Posted: Wed Feb 22, 2006 7:59 pm
by Sergey Tkachenko
Ok, these files were sent to me about 1 year ago by Andrej Sandorf (his email can be found in source files) with comments:
Please note: it's a beta and only used in a private projects. so it's not well tested. And after all: it's the work of two short weekends and i'm still a newbie in generating richview documents as you had seen with those invalid empty hyperlinks (which meanwhile are fixed). But i think it's not that bad.

I attached the zipped source and a zipped demo (with source) (upx-packed).
http://www.trichview.com/support/files/html/

We use Pbear for thirdparty HTML parsing

Posted: Fri Aug 10, 2007 8:08 am
by RainerZ
We bougt the licence, but now Dave's HTML Viewer Components are free for download. :)
http://pbear.com/

Posted: Fri Aug 10, 2007 4:38 pm
by Sergey Tkachenko
It's free, with source code? Very interseting.
Now it really makes sense to support their HTML parser to load HTML in TRichView...

Posted: Tue Aug 14, 2007 2:45 pm
by krho
Sergey, yes it's free with sources. So adding patch you've got with IFDEFs of course for those who don't want to use pbear's components would be very very welcome :)