Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
RichText.ReadContainer
Reads text file from container.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
RichText | 3.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
Container | The container value to read from. | $data |
Result
Returns OK or error message.
Description
Reads text file from container.The plugin uses Mac system functions to read text files including plain text files, RTF files, Word files in doc or xml format, webkit archives or OpenOffice documents.
Warning: The plugin can only read/write the styles/formats which Apple supports for their cocoa framework.
Examples
Read container field:
MBS( "RichText.ReadContainer"; Test::ContainerField )
Read container in one formula:
Let ( [
r = MBS( "RichText.ReadContainer"; MyContainer );
text = MBS( "RichText.FormattedText" )
]; text )
Convert doc/docx/rtf file in container to PDF:
Set Variable [$temppath; Value:MBS( "Path.AddPathComponent"; MBS( "Folders.UserTemporary" ); "temp.pdf")]
Set Variable [$r; Value:MBS( "RichText.ReadContainer"; test::MyContainerDoc )]
Set Variable [$r; Value:MBS( "RichText.WritePDF"; $temppath )]
Set Variable [$r; Value:MBS( "RichText.Release" )]
Set Field [test::MyContainerPDF; MBS("Files.ReadFile"; $temppath; "PDF"; "test.pdf")]
See also
- Files.ReadFile
- Folders.UserTemporary
- Path.AddPathComponent
- RichText.FormattedText
- RichText.Release
- RichText.Text
- RichText.TextLength
- RichText.WriteContainer
- RichText.WriteFile
- RichText.WritePDF
Example Databases
This function checks for a license.
Created 18th August 2014, last changed 14th August 2017
