new for rvhtmlimport

General TRichView support forum. Please post your questions here
Post Reply
siddharth jain
Posts: 3
Joined: Fri Apr 14, 2006 11:11 am
Location: india

new for rvhtmlimport

Post by siddharth jain »

hi
i m new for htmlimport & builder c++ i have installed it but i dont have help file for htmlimport.i downloaded it from net. so could anybody tell me how to start with it or please send me help file on siddharthjain05@gmail.com.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This component does not have a help file.
It's quite easy to use - assign RichView property, then call LoadHtml to load from string, or LoadFromClipboard to read from the Clipboard.
Before calling LoadHtml, assign BasePath property to the path where this HTML is located (including a trailing slash). It will help to load linked images.
One of the most important properties is ClearDocument.
If set to True, the initial document will be cleared, and all existing styles will be removed from RichView's RVStyle.
Another important property is Encoding. By default, it's assumed that HTML files have ANSI encoding (i.e. normal Windows non-Unicode text). Changing it to rvhtmleUTF8 allows loading UTF-8-encoded files (sorry, encoding is not autodetected).
One important hidden setting - value of RVStyle.TextStyles[0].Unicode before loading. If it's True, all new styles will be Unicode (i.e. all loaded text will be in Unicode encoding).
Other properties are self-explanatory, or you can find explanations in the comments at the beginning of RVHtmlImport.pas
Almatov
Posts: 1
Joined: Sat Apr 15, 2006 8:59 am

Post by Almatov »

Hello.

How can I load unicode html-files using TRvHtmlImporter?
I've read that this component supports UTF-8 htmls but when I tried to load one UTF-8 html-file the result was incorrect. In this file all symbols are ANSI except of symbols like &#1111 and such symbols are replaced with '?', so it looks like unicode symbols are simply converted to ansi.

How can I load unicode html-files?

Encoding property is set to rvhtmleUTF8.
TextStyles.Unicode to TRUE.

How to solve this problem?

Thank you,
Almatov.
PS can I write in russian? :)
Bumeranghc
Posts: 8
Joined: Fri Apr 29, 2011 11:49 pm

Post by Bumeranghc »

Hello!

Please provide me an example how I can import images from web using RIchViewActions in C++ Builder.
Bumeranghc
Posts: 8
Joined: Fri Apr 29, 2011 11:49 pm

Post by Bumeranghc »

The goal successfully achieved. Thanks.
Post Reply