ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / RTF functions
  • Character encoding
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the HTML string corresponding to the specified RTF string.
Example
LinuxUniversal Windows 10 App
// MyRTF_String is RTF string
// sHTML is HTML string
// HTM_HTML1 is HTML control
sHTML = RTFToHTML(MyRTF_String)
sTmp is string = "<HTML>" + sHTML + "</HTML>"
HTM_HTML1 = sTmp
WINDEV
// EDT_RTF is RTF control
// sHTML is HTML string
// HTM_HTML1 is HTML control
// Use the management of tables and images (version 23 and later)
sHTML = RTFToHTML(EDT_RTF, rthOptionNone)
sTmp is string = "<HTML>" + sHTML + "</HTML>"
HTM_HTML1 = sTmp
Syntax
<Result> = RTFToHTML(<RTF text or Name of RTF control> [, <Options>])
<Result>: Character string
Text in HTML format
<RTF text or Name of RTF control>: Character string
  • Name of RTF control,
    Universal Windows 10 App This type of parameter is not supported.
  • Character string in RTF.
<Options>: Integer constant
Conversion options:
rthOptionCompatibleUsed to restore the operating mode of version 22 (and earlier). In this case:
  • The tables are not supported.
  • If the images have been included in the RTF (and not linked to the RTF document), they will appear as a set of number in the HTML document.
rthOptionNone
(Default value)
New conversion mode used to manage the images and the tables.
Remarks:
  • The new conversion mode is available in Windows only.
  • The nested tables are not supported.

LinuxUniversal Windows 10 App This parameter is not available. On these platforms:
  • The tables are not supported.
  • If the images have been integrated into the RTF content (and not linked to the RTF document), they will appear as a series of numbers in the HTML document.
Remarks

Character encoding

By default, special and accented characters are not encoded in the HTML string returned by RTFToHTML. Depending on how the HTML content is used, it may be necessary to encode it. For example, if the returned HTML content is assigned to the HTML Editor control, it will have to be converted to UTF-8 with StringToUTF8.
Related Examples:
Switching from the RTF format to the HTML format Unit examples (WINDEV): Switching from the RTF format to the HTML format
[ + ] Using RTFToHTML and RTFToText.
Component: wd290rtf.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/30/2023

Send a report | Local help