var wmf: TMetafile;
Canvas: TMetafileCanvas;
Width, Height: Integer;
begin
RichView1.HScrollPos := 0;
RichView1.VScrollPos := 0;
RichView1.Deselect;
RichView1.Invalidate;
Width := RichView1.RVData.DocumentWidth+RichView1.LeftMargin+RichView1.RightMargin;
Height := RichView1.RVData.DocumentHeight;
wmf := TMetafile.Create;
wmf.Width := Width;
wmf.Height := Height;
Canvas := TMetafileCanvas.Create(wmf, 0);
Canvas.Brush.Color := clWindow;
Canvas.FillRect(Rect(0,0,Width,Height));
RichView1.RVData.PaintTo(Canvas, Rect(0,0,VERYLARGEVALUE,VERYLARGEVALUE));
Canvas.Free;
Image1.Picture.Graphic := wmf;
wmf.Free;
end;