RvHtmlViewImporter cannot import streams to trichview

General TRichView support forum. Please post your questions here
Post Reply
icehouse
Posts: 3
Joined: Tue Jan 12, 2010 9:29 pm
Location: Essen

RvHtmlViewImporter cannot import streams to trichview

Post by icehouse »

Hello,

I am using RvHtmlViewImporter v1.7 and trichview 12.

My intention is to use trichview in an e-mail-program, so I need to import and export to html-files.

Duplication:
1. load one Html-file with image to htmlview
2. use RvHtmlViewImporter to import the htmlpage to trichview.
3. save page and images to streams. Use "cid:" in front of each image. Description from this topic: http://www.trichview.com/forums/viewtopic.php?t=11
4. import htmlpagestream to htmlview
5. add missing image streams with htmlview.insertimage
6. use RvHtmlViewImporter to import the htmlpage to trichview
-> this fails, because cid: is in front of each link and "LoadPicture" in the "unit rvHtmlViewImport" always tries to load from disk.

I already tried to insert the following code to the procedure LoadPicture to import the images from the htmlviewer bitmaplist, but it fails on png or gif images...

Code: Select all

  if copy(source,1,4)='cid:' then
     begin
       gr:=nil;
       i:=htmlviewer.SectionList.BitmapList.IndexOf(Source);
       if i>=0 then
          begin
              gr2:=TPersistent(htmlviewer.SectionList.BitmapList.GetImage(i)); 
              gr := RV_CreateGraphics(TGraphicClass(gr2.ClassType));
              gr.Assign(gr2);
          end;
    end;
Do you know a way to solve this issue?

Best regards,
ICEhouse
Post Reply