Page 1 of 1
Insert Picture Web Path
Posted: Sun Nov 08, 2009 10:19 pm
by monford
I have the code to add an image of coputer but how can I do to add an image from the web?
Please help me! Thanks!
trichview1.insertpicture(...???)?
Posted: Mon Nov 09, 2009 10:32 am
by Sergey Tkachenko
You need to download this picture yourself.
You can find an example of downloading image (using Indy's TIdHttp component) here:
http://trichview.com/resources/html/rvhtml_indy.zip
Then, if you need to store URL with the picture, use rvespImageFileName property:
Code: Select all
rve.TopLevelEditor.BeginUndoGroup(rvutInsert);
rve.TopLevelEditor.SetUndoGroupMode(True);
if rve.InsertPicture('', gr, rvvaBaseline) then
rve.SetCurrentItemExtraStrProperty(rvespImageFileName, URL, True);
rve.TopLevelEditor.SetUndoGroupMode(False);
Sorry
Posted: Mon Nov 09, 2009 11:25 pm
by monford
Undeclared identifier "URL"
am I doing wrong?
Please Look saving html:
Code: Select all
<html><head><title>savuka</title>
</head>
<body bgcolor="#ffffff" leftmargin=5 topmargin=5 rightmargin=5 bottommargin=5>
<font size=2 color="#000000" face="Arial">
<div><img hspace=1 vspace=1 src="[color=red]img31.jpg[/color]"></div>
</font>
</body></html>
I need this code :
Code: Select all
<html><head><title>savuka</title>
</head>
<body bgcolor="#ffffff" leftmargin=5 topmargin=5 rightmargin=5 bottommargin=5>
<font size=2 color="#000000" face="Arial">
<div><img hspace=1 vspace=1 src="[color=red]http://www.site./image.jpg[/color]"></div>
</font>
</body></html>
Please Help me! I need the real path of image!
Posted: Tue Nov 10, 2009 6:18 am
by Sergey Tkachenko
In my code, URL is a string variable where you store path (e.g. '
http://www.site./image.jpg'), gr is a graphic object.
In order to store HTML like you need, include rvsoUseItemImageFileNames in the Options parameter of SaveHTML.
Thanks
Posted: Sun Nov 22, 2009 10:50 pm
by monford
Thanks very much!
God bless you!