WPCubed Product Support

Image Location

Hi

I have a RTF with linked images working with no problems.

I need move my image files to a new location, and change the location of my objects in definitive.

Ex.

My current location is c:\myimages\image1.jpg and I need move the link to c:\MyNewImagesFolder\image1.jpg

How can I do this?

I have tryied to change the location on TextObjects without success on OnRequestHTTPImage event:

TextObject.Source := 'c:\MyNewImagesFolder\image1.jpg';

The images was loaded but when I save the RTF the location keeps the same.

Anyone can help me?

Thanks

#1 ♥ 0
4.2k Views 2 users read 1 min
wpsupport

You need to modify the property TWPObject.StreamName - this can also be done prior to saving in the event PrepareObjectForSaving.

Julian

#2 ♥ 0
wpsupport

Please check the event OnRequestHTTPImage.

You need to set the variable Ok to true.

procedure TForm1.WPRichText1RequestHTTPImage(

RTFData: TWPRTFDataCollectionBase; Reader: TWPCustomTextReader;

const LoadPath, url: string; TextObject: TWPTextObj; var Ok: Boolean);

begin

Ok := true;

end;

#3 ♥ 0
This category is archived. No new posts are possible.