Retrieves the text data in the control as an RTF ANSI text block in a blob or Unicode string. This function does not return graphic data.
Signature controls
Integer controlname.GetDataAsRTF ( data )
Argument |
Description |
---|---|
controlname |
The name of the control for which you want to retrieve the data |
data |
The blob or string in which the RTF data is saved |
Integer. Returns 1 for success and a negative integer for failure.
The GetDataAsRTF function returns text data from a Signature control in PWI format in a blob or a Unicode string. Only text data, such as text entered using the SIP, is retrieved.
The following example gets text data from a Signature control in RTF format as a blob and as a string and writes the RTF to two separate files:
blob lblb_rtf string ls_rtf integer li_file, li_rtn // Get data as a blob li_rtn = sig_1.GetDataAsRTF(lblb_rtf) sle_1.text = string(li_rtn) li_file = FileOpen("\My Documents\blob.rtf", & StreamMode!, Write!, LockWrite!, Replace!) FileWrite( li_file, lblb_rtf ) FileClose( li_file ) // Get data as a string li_rtn = sig_1.GetDataAsRTF(ls_rtf) sle_1.text += ", " + String(li_rtn) li_file = FileOpen("\My Documents\string.rtf", & StreamMode!, Write!, LockWrite!, Replace!) FileWrite( li_file, ls_rtf ) FileClose( li_file )