Table of Contents

ITMSFNCCustomPDFRichTextLib Interface

Provides rich text composition and drawing operations for the PDF library; supports attributed ranges, embedded images, and multi-column text flow.

API unit family: TMSFNCPDFRichTextLib Extends: IInterface

Syntax

ITMSFNCCustomPDFRichTextLib = interface(IInterface)

Remarks

Obtain an instance via ITMSFNCCustomPDFGraphicsExLib.RichText. Build content by calling the range-based attribute methods, then draw with Draw.

Properties

Name Description
DataText Serialized data representation of the rich text document; used for persistence and clipboard operations.
Text Plain text content of the rich text document; setting this replaces all content and clears all formatting.

Methods

Name Description
AddBitmap Inserts a bitmap image at the specified position in the rich text.
AddBitmapFromFile Inserts an image loaded from a file at the specified position in the rich text.
Clear Clears all content and formatting from the rich text document.
DeleteText Deletes the specified character range from the rich text document.
Draw Draws or measures the rich text within the specified rectangle.
ExportData Exports a range of the rich text document to a file in the specified format.
ExportToStream Exports the entire rich text document to a memory stream and returns it.
GetBackgroundColor Returns the background highlight color for the specified text range.
GetBaselineOffset Returns the baseline offset for the specified text range.
GetBold Returns True when the specified text range has bold styling applied.
GetFont Returns the font name and size for the specified text range.
GetFontSize Returns the font size in points for the specified text range.
GetForegroundColor Returns the foreground text color for the specified text range.
GetItalic Returns True when the specified text range has italic styling applied.
GetParagraphStyle Returns the paragraph style for the specified text range.
GetPlainText Returns the complete plain text content of the document, stripping all formatting.
GetPlainTextRange Returns the plain text content of the specified character range, stripping all formatting.
GetRichText Returns the complete rich text document serialized in the given format.
GetRichTextRange Returns the rich text content of the specified character range serialized in the given format.
GetStrikethrough Returns the strikethrough style for the specified text range.
GetStrikethroughColor Returns the strikethrough color for the specified text range.
GetStrokeColor Returns the text stroke color for the specified range.
GetStrokeWidth Returns the text stroke width for the specified range.
GetSubscript Returns the subscript offset for the specified text range.
GetSuperscript Returns the superscript offset for the specified text range.
GetTextLength Returns the total number of characters in the document.
GetToolTip Returns the tooltip string associated with the specified text range.
GetURL Returns the URL associated with the specified text range.
GetUnderline Returns the underline style set for the specified text range.
GetUnderlineColor Returns the underline color for the specified text range.
GetValues Returns the formatting attribute values applied to the specified text range.
ImportData Imports rich text content from a file in the specified format, replacing the current document.
ImportFromStream Imports rich text content from a memory stream, replacing the current document.
InitializeValues Initializes an attribute value record to default neutral values before applying range-specific overrides.
ReplaceText Replaces the specified character range with the given plain text string.
SetBackgroundColor Sets the background highlight color for the specified text range.
SetBaselineOffset Sets the baseline offset for the specified text range.
SetBold Sets or clears bold styling for the specified text range.
SetFont Sets the font name and optionally the size for the specified text range.
SetFontSize Sets the font size in points for the specified text range.
SetForegroundColor Sets the foreground text color for the specified text range.
SetItalic Sets or clears italic styling for the specified text range.
SetParagraphStyle Sets the paragraph style for the specified text range, controlling alignment, indentation, and spacing.
SetRichText Replaces the document content with rich text parsed from the given serialized string.
SetStrikethrough Sets the strikethrough style for the specified text range.
SetStrikethroughColor Sets the strikethrough color for the specified text range.
SetStrokeColor Sets the text stroke color for the specified range.
SetStrokeWidth Sets the text stroke width for the specified range.
SetSubscript Sets the subscript offset for the specified text range.
SetSuperscript Sets the superscript offset for the specified text range.
SetToolTip Sets a tooltip string for the specified text range.
SetURL Assigns a URL to the specified text range so it renders as a clickable hyperlink.
SetUnderline Sets the underline style for the specified text range.
SetUnderlineColor Sets the underline color for the specified text range.