Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Text.RTFToText

Parses RTF to styled text.

Component Version macOS Windows Linux Server iOS SDK
Text 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Text.RTFToText"; RTFData )   More

Parameters

Parameter Description Example
RTFData The RTF data text.

Result

Returns styled text or error.

Description

Parses RTF to styled text.
Should find texts, font name/size, some styles like italic/bold/underline and color.

We read the input with Windows ANSI encoding to get characters right for RTF files from Windows without encoding specs, so if you read it from a file with Text.ReadTextFile, please specify "Windows" as encoding to use.

Examples

Convert RTF in a field to styled text in a new field

Set Field [ test::StypedText ; MBS( "Text.RTFToText"; test::RTFText ) ]

Read text from a text clipping:

Let([
    containerValue = Kontakte::Foto;
    plist = MBS( "PList.ReadData"; containerValue );
    rtf = JSONGetElement ( plist; "['UTI-Data'].['public.rtf']");
    text = MBS( "Text.RTFToText"; rtf)
]; text)

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 19th May 2021, last changed 18th March 2024


Text.MimeTypeToFileExtension - Text.ReadEMLXFile