Problem with image links when importing/exporting RTF &
Posted: Mon Jun 25, 2007 9:20 pm
I've followed one of your examples elsewhere for saving an image as a link. The image is inserted into RVEdit and when the RTF is saved I trap OnSaveItemToFile, use RVData->GetItemExtraStrProperty(ItemNo,rvespImageFileName... to get the filename and write out RTF with
OutStr="{\\field{\\*\\fldinst INCLUDEPICTURE \""+Loc+"\" \\\\d }}";
This works great.
When the RTF is loaded back in to RVEdit with LoadRTFFromStream I trap OnImportPicture, load the picture passed through in Location and all is well.
The problem then comes that if the user saves this file as HTML when I trap OnHTMLSaveImage the original link is not available in rvespImageFileName so at this point the image is lost.
I tried setting rvespImageFileName myself during OnImportPicture, but I can't figure out which item number to set it on, as ItemNo isn't passed through to this call.
Is there any way to fix this issue?
Many thanks
--
Simon.
OutStr="{\\field{\\*\\fldinst INCLUDEPICTURE \""+Loc+"\" \\\\d }}";
This works great.
When the RTF is loaded back in to RVEdit with LoadRTFFromStream I trap OnImportPicture, load the picture passed through in Location and all is well.
The problem then comes that if the user saves this file as HTML when I trap OnHTMLSaveImage the original link is not available in rvespImageFileName so at this point the image is lost.
I tried setting rvespImageFileName myself during OnImportPicture, but I can't figure out which item number to set it on, as ItemNo isn't passed through to this call.
Is there any way to fix this issue?
Many thanks
--
Simon.