Page 1 of 1

De-encapsulate HTML from RTF

Posted: Sun Aug 30, 2015 11:47 am
by anovikov
Hi Sergey,

We need to be able to work with RTF that encapsulates HTML. See more here:

https://msdn.microsoft.com/en-us/librar ... 80%29.aspx

and

https://www.microsoft.com/en-us/downloa ... x?id=10725

These formats are usual when working with MSG messages from Outlook.

Is there a way to render HTML from the RTF (= "de-encapsulate") using existing feature set of TRichViewEditor? In other words, generate the HTML texts contained withing the RTF wrapper.

If not, can you point to the right direction so we can implement it ourselves using your RTF parser events. That should be rather straightforward as the number of RTF dealing with this encapsulation are just a few and contain the HTML tags embedded in them.

I can send you samples if needed.

Thanks,

Art

Posted: Mon Aug 31, 2015 10:07 am
by Sergey Tkachenko
This feature is not implemented in our components, and we do not plan to implement it.
Our parser should extract RTF part from these files, and ignore HTML fragments.
Our RTF parser is in RVRTF.pas. This class can be used separately from the component - you just need to assign your own event handlers. For example, see http://www.trichview.com/forums/viewtopic.php?t=2702