CSS in RvHtmlImporter

General TRichView support forum. Please post your questions here
Post Reply
andrew

CSS in RvHtmlImporter

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This is a limitation of TrvHtmlImporter
eddiev
Posts: 7
Joined: Fri Feb 17, 2006 8:41 pm

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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)
eddiev
Posts: 7
Joined: Fri Feb 17, 2006 8:41 pm

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
hruslan2000
Posts: 81
Joined: Mon Aug 29, 2005 5:00 am

Post 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?
eddiev
Posts: 7
Joined: Fri Feb 17, 2006 8:41 pm

Post by eddiev »

:D Thanks for the answer and a example will be perfect!. I'll be waiting for the example :cry: .

Regards.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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/
RainerZ
Posts: 4
Joined: Thu Aug 09, 2007 5:57 pm

We use Pbear for thirdparty HTML parsing

Post by RainerZ »

We bougt the licence, but now Dave's HTML Viewer Components are free for download. :)
http://pbear.com/
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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...
krho
Posts: 33
Joined: Wed Nov 01, 2006 10:17 am

Post 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 :)
Post Reply