Page 1 of 1
Cannot view imported(from doc) file
Posted: Sun Apr 24, 2011 8:29 am
by Alextp
Created Office converter component (name R). Imported .doc to Stream (ImportRTF method, result true, Stream.size is 25K so imported Ok)
Now call RichView.LoadRTFFromStream(R.Stream). Richview empty. Why? LineCount=0
Posted: Sun Apr 24, 2011 8:46 am
by Alextp
Code: Select all
begin
if not R.ImportRTF('d:\t\1.doc' , n{4}) then ShowMessage('import');
R.Stream.Position:= 0;
RR.Clear;
if not RR.LoadRTFFromStream(R.Stream) then ShowMessage('load');
R.Stream.SetSize(0);
end;
RR- richview. 13.0.1
Posted: Sun Apr 24, 2011 8:51 am
by Sergey Tkachenko
Call RR.Format at the end.
Posted: Sun Apr 24, 2011 9:44 am
by Alextp
ok. I found possible bug: if i import file to Richviewedit, not same styles applied to lines in file. Some styles the same, some not. 'Styles' prop is the same (in RV, RVE). I can send .doc file
Posted: Sun Apr 24, 2011 7:01 pm
by Sergey Tkachenko
First, make sure that properties of RR allows adding new styles when importing RTF.
RR.RTFReadProperties.TextStyleMode must be equal to RR.RTFReadProperties.ParaStyleMode must be equal to rvrsAddIfNeeded.
If they are equal, but the problem still exists, send this doc to me to richviewgmailcom.
Posted: Mon Apr 25, 2011 7:25 am
by Alextp
Were not set. Ok now