4

In Delphi XE4 FireMonkey, I have some RTF in a stream from a database. It uses only fonts, sizes, bold and italics.

How can I extract the plain text or convert it to HTML?

Can I somehow use JVCL's component(s) even though I'm using FireMonkey?

Filipe.Fonseca
  • 321
  • 2
  • 14
Mike at Bookup
  • 1,211
  • 14
  • 32
  • Have you tried a search engine (for example with the keywords delphi rtf html converter library)? (disclaimer: I am the author of a commercial converter library / component for Delphi / Free Pascal) – mjn Feb 06 '14 at 21:33
  • TRichEdit can degrade RTF to plain easily. – Free Consulting Feb 06 '14 at 21:47
  • Windowless rich text control is the usual way. Tricky to call from Delphi due to its use of ms fastcall. – David Heffernan Feb 06 '14 at 21:56
  • The key is "FireMonkey." If I had access to TRichEdit this job would be so over.:) – Mike at Bookup Feb 07 '14 at 16:36
  • I have checked out the documentation for the ScroogeXHTML solution and it's still not clear to me if it will work inside of FireMonkey. I don't need it to be cross platform. – Mike at Bookup Feb 07 '14 at 16:38
  • If you don't need cross platform then you can use rich edit. Why do you think otherwise? You'd normally want windowless rich text though. – David Heffernan Feb 07 '14 at 20:23
  • @DavidHeffernan The reason I thought I couldn't use a TRichEdit in FireMonkey is that there simply wasn't one available in the component palette. I've since figured out how to create a VCL one in code and get it to convert RTF to plain text. – Mike at Bookup Feb 12 '14 at 14:09
  • Using a windowed control is a little heavyweight for this task, but of course it does work#. That's why windowless rich text exists. But it's a shame it's so hard to reach. – David Heffernan Feb 12 '14 at 14:25
  • ScroogeXHTML uses only simple RTL methods and data types. It is independent of the VCL. Maybe you can try it and be the first to know (the library comes with a money back guarantee). The on-line demo for the Java version (as a quick test for the output quality) is at https://secure.habariwebcomponents.de/sxd/ – mjn Oct 02 '14 at 16:49

0 Answers0