Example #1
0
 /// <summary>
 /// load rtf document
 /// </summary>
 /// <param name="reader">text reader</param>
 /// <returns>is operation successful</returns>
 public bool LoadReader(System.IO.TextReader reader)
 {
     //myTokenStack.Clear();
     myCurrentToken = null;
     if (reader != null)
     {
         myReader = reader;
         myLex    = new RTFLex(myReader);
         return(true);
     }
     return(false);
 }
Example #2
0
 /// <summary>
 /// load rtf text
 /// </summary>
 /// <param name="strText">RTF text</param>
 /// <returns>is operation successful</returns>
 public bool LoadRTFText(string strText)
 {
     //myTokenStack.Clear();
     myCurrentToken = null;
     if (strText != null && strText.Length > 3)
     {
         myReader = new System.IO.StringReader(strText);
         myLex    = new RTFLex(myReader);
         return(true);
     }
     return(false);
 }
Example #3
0
 /// <summary>
 /// load rtf document
 /// </summary>
 /// <param name="strFileName">spcial file name</param>
 /// <returns>is operation successful</returns>
 public bool LoadRTFFile(string strFileName)
 {
     //myTokenStack.Clear();
     myCurrentToken = null;
     if (System.IO.File.Exists(strFileName))
     {
         System.IO.FileStream stream = new System.IO.FileStream(strFileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
         myReader     = new System.IO.StreamReader(stream, System.Text.Encoding.ASCII);
         myBaseStream = stream;
         myLex        = new RTFLex(myReader);
         return(true);
     }
     return(false);
 }