I'm using the TRichview 1.9.48, D5 and have some problems in reading *.rtf files/streams via the methods LoadRTF and LoadRTFFromStream (reports an exception: "invalid bitmap" in file rvrtf.pas, line 3149, "LoadGraphic(gr);").
All rtf-files and -streams are generated via the RvHtmlImporter component (converting user generated HTML-emails to rtf) and the methods SaveRTF and SaveRTFToStream of the TRichviewEdit component, but for some of them, the output is no more readable for the TRichviewEdit component. The directly converted document will be displayed in the corresp. TRichviewEdit (which is directly linked to the RvHtmlImporter) and looks ok.
All components have no special property settings.
Please can I attach a generated *.rtf anywhere to this message, so it's easier for you to reproduce the error.
Thanks
Mafi
TRichviewEdit: Unable to read exported rtf files/streams
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Please send them to svt@trichview.com
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I received this file.
The problem is caused by a zero-size bitmap:
{\pict\dibitmap0\wbmwidthbytes0\picw0\pich0\picwgoal0\pichgoal0 }
Fix: open RVRTF.pas, find the procedure LoadGraphic(var gr: TGraphic), add in case:
The problem is caused by a zero-size bitmap:
{\pict\dibitmap0\wbmwidthbytes0\picw0\pich0\picwgoal0\pichgoal0 }
Fix: open RVRTF.pas, find the procedure LoadGraphic(var gr: TGraphic), add in case:
Code: Select all
rtf_pict_DIB:
if FPicture.FData.Size>sizeof(TBitmapFileHeader) then begin
FPicture.FData.Position := 0;
gr.LoadFromStream(FPicture.FData);
end;