Page 1 of 1

Print as Image

Posted: Thu Mar 29, 2007 9:14 am
by gully
Hi Sergey,
I need to do print from TRichView with use of FastReport, and for that I would like to use bitmap.
Now I use the following procedure:

Code: Select all

procedure PrintAsBitmap(Source:TCustomRichView; DestDir: string);
 var
  rvPrnt: TRVPrint;
  bmp: TBitmap;
  I: integer;
begin
  DestDir := IncludeTrailingPathDelimiter(DestDir);
  bmp := TBitmap.Create;
  rvPrnt := TRVPrint.Create(Self);
  try
    rvPrnt.AssignSource(Source);
    rvPrnt.FormatPages(rvdoALL);
    for I := 1 to rvPrnt.PagesCount do
    begin
      rvPrnt.MakePreview(I, bmp);
      bmp.SaveToFile(DestDir + 'Bitmap_' + IntToStr(I) + '.bmp')
    end;
  finally
    rvPrnt.Free;
    bmp.Free
  end
end;
... but I will need higher resolution of the bitmap.
I would like to ask you, how can I get higher resolution of the bitmap?
Thank you for your answer.

Posted: Thu Mar 29, 2007 2:37 pm
by Sergey Tkachenko
You can use MakeScaledPreview to draw preview in larger bitmap.