trichview.com

trichview.support




Saving images when saving an imported rtffile to html


Return to index


Author

Message

Wietse Hagoort

Posted: 10/30/2004 13:33:57


Hi Sergey,


When i'm importing a rtf file, everything works perfect.

Even the linked images in the rtf file are loaded (by an even ofcourse).


But when I save the document to HTML the onHTMLSaveImage is fired, but the

code to retrieve the imagepath is not saved!


Sample rtf file:

http://www.xs4all.nl/~whagoort/trichview/55.rtf


OnHTMLSaveImage:

  if ItemNo>=0 then begin

    Location := RVData.GetItemText(ItemNo);

    // location is empty when saving an imported file

    DoDefault := false;

  end


Load image code:

    RichViewEdit1.RTFReadProperties.IgnorePictures := false;


    RichViewEdit1.Clear;

    RichViewEdit1.LoadRTF( RTFFilepath );


    RichViewEdit1.Format;

    RichViewEdit1.Update;


    RichViewEdit1.RTFReadProperties.IgnorePictures := true;


Save to HTML code:

  RichViewEdit1.SaveHTMLToStreamEx( StrStream, '', '', '', '', '', '', [rvsoNoHypertextImageBorders,rvsoUseItemImageFileNames]);


Do you have a solution where I can retrieve the image src in OnHtmlSaveImage?


Thanks in advance,

Wietse Hagoort

- DNA Services BV





Powered by ABC Amber Outlook Express Converter