I used TRVRTFReader to extract plain text in a fast way from rtf files.
Now I had to convert the whole system to rvf files.
Is there a similar way to get the whole file content as plain text as easy?
RVF-parser ...?
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
No Tables.Sergey Tkachenko wrote:If a document does not contain tables, reading a plain text from RVF without TRichView can be implemented very simple.
I load the rvf file into a temporary RVEdit, iterate all the items and extract the text by rv.GetItemText(i). I thought there would be a built-in method for that.
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
RVF specification is here: http://www.trichview.com/help/rvf_specification.html
RVF consists of records.
Each record has a header line. Each header line starts from several numbers separated by space characters.
You need records starting from zero or positive number, they represent text. The second number is the number of text lines in this record.
You need to skip the rest of records. The second number in the record is the number of lines to skip. A special case: the fifth number equal to 2. In this case, the last line in this record is not a text line but binary data. Binary data starts from its size (4bytes).
RVF consists of records.
Each record has a header line. Each header line starts from several numbers separated by space characters.
You need records starting from zero or positive number, they represent text. The second number is the number of text lines in this record.
You need to skip the rest of records. The second number in the record is the number of lines to skip. A special case: the fifth number equal to 2. In this case, the last line in this record is not a text line but binary data. Binary data starts from its size (4bytes).