Page 1 of 1
problem with paste from Internet page
Posted: Thu Dec 18, 2008 10:46 am
by chubb
Hello
I have a problem with RichViewEdit
when I paste some text with pictures into RV - I'm getting an error:
Project raised exeption class EFopenError with message 'Cannot open file D:\Project\http:\<site>\logo.gif'. Syntax error....
I found some solution on the forum (
http://www.trichview.com/forums/viewtop ... light=http), but I didtn't chatch the idea of it
how to fill in liste_images in remixtech's reply?
can anyone help me?
thanks
Posted: Thu Dec 18, 2008 2:18 pm
by Sergey Tkachenko
Does your application support gif images? See here:
http://www.trichview.com/forums/viewtopic.php?t=89
Posted: Thu Dec 18, 2008 2:29 pm
by chubb
yes
I've got included GifImage.pas
and no matter is it gif or jpg file
reaction is the same
Posted: Sun Dec 21, 2008 12:25 pm
by Sergey Tkachenko
Well, I can see that the problem is not in gif, but in invalid file name. Obviously, D:\Project\http:\<site>\logo.gif is not a valid file name.
Please send me these files, I'll try to see what's wrong.
Posted: Wed Dec 24, 2008 3:10 pm
by chubb
Sergey Tkachenko wrote:Well, I can see that the problem is not in gif, but in invalid file name. Obviously, D:\Project\http:\<site>\logo.gif is not a valid file name.
this is a problem, for sure
Sergey Tkachenko wrote:Please send me these files, I'll try to see what's wrong.
which files i should send to you?
I can't understand why filename "D:\Project\http:\<site>\logo.gif" appears.
thank you
Posted: Wed Dec 24, 2008 3:37 pm
by Sergey Tkachenko
HTML files, from where you pasted
Posted: Thu Dec 25, 2008 11:20 am
by chubb
Sergey Tkachenko wrote:HTML files, from where you pasted
it happens when copy-pasting from any internet page
i've noticed that while runing project from Delphi (building) - I'm getting mentioned exception
but when I run copmiled .exe file - I don't get an exception though instead of picture I have blank picture in RV
Posted: Thu Dec 25, 2008 4:34 pm
by Sergey Tkachenko
1. What page (URL) do you copy from?
2. What browser do you use for copying?
3. Do you paste in HTML format using TrvHtmlImporter, or RTF (without using it)?
Posted: Fri Dec 26, 2008 9:06 am
by chubb
Sergey Tkachenko wrote:1. What page (URL) do you copy from?
any page
fo example
http://www.trichview.com/ title page
Sergey Tkachenko wrote:2. What browser do you use for copying?
IE 7, FF3
Sergey Tkachenko wrote:3. Do you paste in HTML format using TrvHtmlImporter, or RTF (without using it)?
I copy directly from page to clipboard and than paste to RichViewEdit
I don't know how to make it, but I just want to save HTML page with copy-paste operations
I don't care about styles and CSS. I just want pictures and text saved to RV
thanks
Posted: Fri Dec 26, 2008 5:11 pm
by Sergey Tkachenko
I cannot reproduce this problem when copying from
www.trichview.com.
When I copy from IE7 to to RichViewEdit without assigned events, it attempts to load pictures from their original locations (such as "
http://www.trichview.com/images/headers/news.gif"). Of course it fails because images need to be downloaded.
Or may be you paste into ActionTest demo with Indy support turned on?
What version of TRichView do you use?
In order to help you, I need a detailed instructions how to reproduce this problem, because all works fine on my side.
Posted: Tue Jan 13, 2009 1:35 pm
by chubb
Happy New Year and Merry Christmas!
Sergey Tkachenko wrote:I cannot reproduce this problem when copying from
www.trichview.com.
When I copy from IE7 to to RichViewEdit without assigned events, it attempts to load pictures from their original locations (such as "
http://www.trichview.com/images/headers/news.gif").
Of course it fails because images need to be downloaded.
ok, can you advise me what actions should I do to download images, save them in temporary files and than paste in RV as it looks on web-page?
may be there is an example somewhere?
Sergey Tkachenko wrote:Or may be you paste into ActionTest demo with Indy support turned on?
What version of TRichView do you use?
10
Sergey Tkachenko wrote:In order to help you, I need a detailed instructions how to reproduce this problem, because all works fine on my side.
I thik that main issue is "it fails because images need to be downloaded"
Posted: Wed Jan 14, 2009 5:33 pm
by Sergey Tkachenko
If the problem was because images not downloaded, the error message would be like 'Cannot open file
http://www.somesite.com/logo.gif', i.e. picture name would be a correct URL...
I recommend to update to TRichView 11. It has some fixes when importing documents with external images.
As for downloading.
If you use RichViewActions, they do this work automatically. Just enable support for Indy:
http://www.trichview.com/help-actions/indy.htm
If you do not use RichViewActions, process RichViewEdit.OnImportPicture event. In this event, if the path parameter is a http location, download the image in a temporal location (using TIdHttp component, for example), then insert this picture. I currently only have an example with TrvHtmlImporter (
http://trichview.com/resources/html/rvhtml_indy.zip ) This example uses TrvHtmlImporter's event, so it needs to be corrected to use RichViewEdit.OnImportPicture.